mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-01-18 17:31:19 +01:00
[SYCL-2020] Add test to validate SYCL in Eigen core.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
d4ae542ed1
commit
24d15e086f
@@ -368,8 +368,10 @@ macro(ei_testing_print_summary)
|
||||
if(EIGEN_TEST_SYCL)
|
||||
if(EIGEN_SYCL_TRISYCL)
|
||||
message(STATUS "SYCL: ON (using triSYCL)")
|
||||
else()
|
||||
elseif(EIGEN_SYCL_ComputeCpp)
|
||||
message(STATUS "SYCL: ON (using computeCPP)")
|
||||
elseif(EIGEN_SYCL_DPCPP)
|
||||
message(STATUS "SYCL: ON (using DPCPP)")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "SYCL: OFF")
|
||||
|
||||
64
cmake/SyclConfigureTesting.cmake
Normal file
64
cmake/SyclConfigureTesting.cmake
Normal file
@@ -0,0 +1,64 @@
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
# Forward CMake options as preprocessor definitions
|
||||
if(EIGEN_SYCL_USE_DEFAULT_SELECTOR)
|
||||
add_definitions(-DEIGEN_SYCL_USE_DEFAULT_SELECTOR=${EIGEN_SYCL_USE_DEFAULT_SELECTOR})
|
||||
endif()
|
||||
if(EIGEN_SYCL_NO_LOCAL_MEM)
|
||||
add_definitions(-DEIGEN_SYCL_NO_LOCAL_MEM=${EIGEN_SYCL_NO_LOCAL_MEM})
|
||||
endif()
|
||||
if(EIGEN_SYCL_LOCAL_MEM)
|
||||
add_definitions(-DEIGEN_SYCL_LOCAL_MEM=${EIGEN_SYCL_LOCAL_MEM})
|
||||
endif()
|
||||
if(EIGEN_SYCL_MAX_GLOBAL_RANGE)
|
||||
add_definitions(-DEIGEN_SYCL_MAX_GLOBAL_RANGE=${EIGEN_SYCL_MAX_GLOBAL_RANGE})
|
||||
endif()
|
||||
if(EIGEN_SYCL_LOCAL_THREAD_DIM0)
|
||||
add_definitions(-DEIGEN_SYCL_LOCAL_THREAD_DIM0=${EIGEN_SYCL_LOCAL_THREAD_DIM0})
|
||||
endif()
|
||||
if(EIGEN_SYCL_LOCAL_THREAD_DIM1)
|
||||
add_definitions(-DEIGEN_SYCL_LOCAL_THREAD_DIM1=${EIGEN_SYCL_LOCAL_THREAD_DIM1})
|
||||
endif()
|
||||
if(EIGEN_SYCL_REG_M)
|
||||
add_definitions(-DEIGEN_SYCL_REG_M=${EIGEN_SYCL_REG_M})
|
||||
endif()
|
||||
if(EIGEN_SYCL_REG_N)
|
||||
add_definitions(-DEIGEN_SYCL_REG_N=${EIGEN_SYCL_REG_N})
|
||||
endif()
|
||||
if(EIGEN_SYCL_ASYNC_EXECUTION)
|
||||
add_definitions(-DEIGEN_SYCL_ASYNC_EXECUTION=${EIGEN_SYCL_ASYNC_EXECUTION})
|
||||
endif()
|
||||
if(EIGEN_SYCL_DISABLE_SKINNY)
|
||||
add_definitions(-DEIGEN_SYCL_DISABLE_SKINNY=${EIGEN_SYCL_DISABLE_SKINNY})
|
||||
endif()
|
||||
if(EIGEN_SYCL_DISABLE_DOUBLE_BUFFER)
|
||||
add_definitions(-DEIGEN_SYCL_DISABLE_DOUBLE_BUFFER=${EIGEN_SYCL_DISABLE_DOUBLE_BUFFER})
|
||||
endif()
|
||||
if(EIGEN_SYCL_DISABLE_SCALAR)
|
||||
add_definitions(-DEIGEN_SYCL_DISABLE_SCALAR=${EIGEN_SYCL_DISABLE_SCALAR})
|
||||
endif()
|
||||
if(EIGEN_SYCL_DISABLE_GEMV)
|
||||
add_definitions(-DEIGEN_SYCL_DISABLE_GEMV=${EIGEN_SYCL_DISABLE_GEMV})
|
||||
endif()
|
||||
if(EIGEN_SYCL_DISABLE_ARM_GPU_CACHE_OPTIMISATION)
|
||||
add_definitions(-DEIGEN_SYCL_DISABLE_ARM_GPU_CACHE_OPTIMISATION=${EIGEN_SYCL_DISABLE_ARM_GPU_CACHE_OPTIMISATION})
|
||||
endif()
|
||||
|
||||
if(EIGEN_SYCL_ComputeCpp)
|
||||
if(MSVC)
|
||||
list(APPEND COMPUTECPP_USER_FLAGS -DWIN32)
|
||||
else()
|
||||
list(APPEND COMPUTECPP_USER_FLAGS -Wall)
|
||||
endif()
|
||||
# The following flags are not supported by Clang and can cause warnings
|
||||
# if used with -Werror so they are removed here.
|
||||
if(COMPUTECPP_USE_COMPILER_DRIVER)
|
||||
set(CMAKE_CXX_COMPILER ${ComputeCpp_DEVICE_COMPILER_EXECUTABLE})
|
||||
string(REPLACE "-Wlogical-op" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "-Wno-psabi" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
endif()
|
||||
list(APPEND COMPUTECPP_USER_FLAGS
|
||||
-DEIGEN_NO_ASSERTION_CHECKING=1
|
||||
-no-serial-memop
|
||||
-Xclang
|
||||
-cl-mad-enable)
|
||||
endif(EIGEN_SYCL_ComputeCpp)
|
||||
Reference in New Issue
Block a user