forked from codeplaysoftware/portBLAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Target based gemm optimisation (codeplaysoftware#75)
* Add Target option to enable/disable specific target optimisation at compile time. * Optimising GEMM for RCAR targets. * Adding SYCLBLAS Configuration to both benchmark and test
- Loading branch information
1 parent
1b2cd2b
commit 2af4200
Showing
6 changed files
with
103 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
# We add some flags to workaround OpenCL platform bugs, see ComputeCpp documentation | ||
set(COMPUTECPP_DEVICE_COMPILER_FLAGS | ||
"${COMPUTECPP_DEVICE_COMPILER_FLAGS} -no-serial-memop -Xclang -cl-mad-enable -O3") | ||
message(STATUS "${COMPUTECPP_DEVICE_COMPILER_FLAGS}") | ||
|
||
# Check to see if we've disabled double support in the tests | ||
option(NO_DOUBLE_SUPPORT "Disable double support when testing." off) | ||
if(NO_DOUBLE_SUPPORT) | ||
# Define NO_DOUBLE_SUPPORT for the host cxx compiler | ||
add_definitions(-DNO_DOUBLE_SUPPORT) | ||
endif() | ||
|
||
# If the user has specified a specific workgroup size for tests, pass that on to the compiler | ||
if(WG_SIZE) | ||
add_definitions(-DWG_SIZE=${WG_SIZE}) | ||
endif() | ||
|
||
# If the user has specified that we should use naive gemm, enable that | ||
option(NAIVE_GEMM "Default to naive GEMM implementations" off) | ||
if(NAIVE_GEMM) | ||
add_definitions(-DNAIVE_GEMM) | ||
endif() | ||
|
||
if(DEFINED TARGET) | ||
message(STATUS "TARGET is defined") | ||
if(${TARGET} STREQUAL "INTEL_GPU") | ||
message(STATUS "${TARGET} device is chosen") | ||
add_definitions(-DINTEL_GPU) | ||
# If the user has specified RCAR as a target backend the optimisation for all other device will be disabled | ||
elseif(${TARGET} STREQUAL "RCAR") | ||
message(STATUS "${TARGET} device is chosen") | ||
add_definitions(-DRCAR) | ||
else() | ||
message(STATUS "No specific TARGET is defined. TARGET will be selected at runtime.") | ||
add_definitions(-DDYNAMIC) | ||
endif() | ||
else() | ||
message(STATUS "No specific TARGET is defined. TARGET will be selected at runtime.") | ||
add_definitions(-DDYNAMIC) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters