File tree Expand file tree Collapse file tree 5 files changed +18
-9
lines changed
tests/unit_tests/rng/device Expand file tree Collapse file tree 5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 2020install (FILES FindCompiler.cmake
2121 DESTINATION "lib/cmake/${PROJECT_NAME} "
2222)
23-
2423if (ENABLE_MKLGPU_BACKEND OR ENABLE_MKLCPU_BACKEND)
2524 install (FILES mkl/MKLConfig.cmake
2625 DESTINATION "lib/cmake/${PROJECT_NAME} "
Original file line number Diff line number Diff line change 1818#===============================================================================
1919
2020include_guard ()
21-
2221include (CheckCXXCompilerFlag)
2322include (FindPackageHandleStandardArgs)
24-
2523check_cxx_compiler_flag("-fsycl" is_dpcpp)
2624
2725if (is_dpcpp)
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ foreach(rng_device_source ${RNG_DEVICE_SOURCES})
5959 ONEMKL::SYCL::SYCL
6060 )
6161
62+ if (NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl" )
63+ target_link_options (example_${domain} _${rng_device_source} PUBLIC -fsycl -fsycl-device-code-split=per_kernel)
64+ endif ()
65+
6266 # Register example as ctest
6367 foreach (device_filter ${DEVICE_FILTERS} )
6468 add_test (NAME ${domain} /EXAMPLE/DEVICE/${rng_device_source} /${device_filter} COMMAND example_${domain} _${rng_device_source} )
Original file line number Diff line number Diff line change 1818#===============================================================================
1919
2020# Build object from all test sources
21- set (SERVICE_TESTS_SOURCES "moments.cpp" )
21+ set (MOMENTS_DEVICE_TESTS_SOURCES "moments.cpp" )
2222
23- add_library (rng_device_moments_ct OBJECT ${SERVICE_TESTS_SOURCES } )
23+ add_library (rng_device_moments_ct OBJECT ${MOMENTS_DEVICE_TESTS_SOURCES } )
2424target_compile_options (rng_device_moments_ct PRIVATE -DNOMINMAX)
2525target_include_directories (rng_device_moments_ct
2626 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /../include
@@ -30,7 +30,11 @@ target_include_directories(rng_device_moments_ct
3030 PUBLIC ${CMAKE_BINARY_DIR} /bin
3131)
3232if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
33- add_sycl_to_target(TARGET rng_device_moments_ct SOURCES ${SERVICE_TESTS_SOURCES } )
33+ add_sycl_to_target(TARGET rng_device_moments_ct SOURCES ${MOMENTS_DEVICE_TESTS_SOURCES } )
3434else ()
3535 target_link_libraries (rng_device_moments_ct PUBLIC ONEMKL::SYCL::SYCL)
3636endif ()
37+
38+ if (NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl" )
39+ target_link_options (rng_device_moments_ct PUBLIC -fsycl -fsycl-device-code-split=per_kernel)
40+ endif ()
Original file line number Diff line number Diff line change 1818#===============================================================================
1919
2020# Build object from all test sources
21- set (SERVICE_TESTS_SOURCES "skip_ahead.cpp" )
21+ set (SERVICE_DEVICE_TESTS_SOURCES "skip_ahead.cpp" )
2222
23- add_library (rng_device_service_ct OBJECT ${SERVICE_TESTS_SOURCES } )
23+ add_library (rng_device_service_ct OBJECT ${SERVICE_DEVICE_TESTS_SOURCES } )
2424target_compile_options (rng_device_service_ct PRIVATE -DNOMINMAX)
2525target_include_directories (rng_device_service_ct
2626 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /../include
@@ -30,7 +30,11 @@ target_include_directories(rng_device_service_ct
3030 PUBLIC ${CMAKE_BINARY_DIR} /bin
3131)
3232if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
33- add_sycl_to_target(TARGET rng_device_service_ct SOURCES ${SERVICE_TESTS_SOURCES } )
33+ add_sycl_to_target(TARGET rng_device_service_ct SOURCES ${SERVICE_DEVICE_TESTS_SOURCES } )
3434else ()
3535 target_link_libraries (rng_device_service_ct PUBLIC ONEMKL::SYCL::SYCL)
3636endif ()
37+
38+ if (NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl" )
39+ target_link_options (rng_device_service_ct PUBLIC -fsycl -fsycl-device-code-split=per_kernel)
40+ endif ()
You can’t perform that action at this time.
0 commit comments