-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for SimSYCL as a SYCL implementation
- Loading branch information
Showing
19 changed files
with
157 additions
and
20 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,15 @@ | ||
accessor_legacy | ||
atomic | ||
atomic_ref_stress | ||
exception_handling | ||
image | ||
image_accessor | ||
kernel | ||
kernel_args | ||
kernel_bundle | ||
math_builtin_api | ||
multi_ptr | ||
reduction | ||
sampler | ||
spec_constants | ||
stream |
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,45 @@ | ||
add_library(SYCL::SYCL INTERFACE IMPORTED GLOBAL) | ||
target_link_libraries(SYCL::SYCL INTERFACE SimSYCL::simsycl) | ||
# add_sycl_executable_implementation function | ||
# Builds a SYCL program, compiling multiple SYCL test case source files into a | ||
# test executable, invoking a single-source/device compiler | ||
# Parameters are: | ||
# - NAME Name of the test executable | ||
# - OBJECT_LIBRARY Name of the object library of all the compiled test cases | ||
# - TESTS List of SYCL test case source files to be built into the | ||
# test executable | ||
function(add_sycl_executable_implementation) | ||
cmake_parse_arguments(args "" "NAME;OBJECT_LIBRARY" "TESTS" ${ARGN}) | ||
set(exe_name ${args_NAME}) | ||
set(object_lib_name ${args_OBJECT_LIBRARY}) | ||
set(test_cases_list ${args_TESTS}) | ||
|
||
add_library(${object_lib_name} OBJECT ${test_cases_list}) | ||
add_executable(${exe_name} $<TARGET_OBJECTS:${object_lib_name}>) | ||
|
||
# hipSYCL needs the macro to be called on both the object library (to | ||
# override the compiler) and the executable (to override the linker). | ||
add_sycl_to_target(TARGET ${object_lib_name} SOURCES ${test_cases_list}) | ||
add_sycl_to_target(TARGET ${exe_name}) | ||
|
||
set_target_properties(${object_lib_name} PROPERTIES | ||
INCLUDE_DIRECTORIES $<TARGET_PROPERTY:${exe_name},INCLUDE_DIRECTORIES> | ||
COMPILE_DEFINITIONS $<TARGET_PROPERTY:${exe_name},COMPILE_DEFINITIONS> | ||
COMPILE_OPTIONS $<TARGET_PROPERTY:${exe_name},COMPILE_OPTIONS> | ||
COMPILE_FEATURES $<TARGET_PROPERTY:${exe_name},COMPILE_FEATURES> | ||
POSITION_INDEPENDENT_CODE ON) | ||
endfunction() | ||
|
||
function(add_sycl_to_target) | ||
set(options) | ||
set(one_value_keywords TARGET) | ||
set(multi_value_keywords SOURCES) | ||
cmake_parse_arguments(ADD_SYCL | ||
"${options}" | ||
"${one_value_keywords}" | ||
"${multi_value_keywords}" | ||
${ARGN} | ||
) | ||
|
||
target_link_libraries(${ADD_SYCL_TARGET} PUBLIC SimSYCL::simsycl) | ||
endfunction() |
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
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
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
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
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
Oops, something went wrong.