Skip to content

Commit 5f0ff23

Browse files
committed
[cmake] Added support for disabling half
1 parent 36030f4 commit 5f0ff23

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ endif()
6868
option(ENABLE_CUBLAS_BACKEND "" OFF)
6969
option(ENABLE_CURAND_BACKEND "" OFF)
7070
option(ENABLE_NETLIB_BACKEND "" OFF)
71-
set(ONEMKL_SYCL_IMPLEMENTATION "dpc++" CACHE STRING "Specifiy the SYCL implementation against which oneMKL should be built")
71+
option(DISABLE_HALF_RUTINES "" OFF)
72+
option(ONEMKL_SYCL_IMPLEMENTATION "" "dpc++")
73+
74+
7275

7376
## Domains
7477
set(DOMAINS_LIST "")
@@ -130,12 +133,13 @@ if(WIN32)
130133
add_library(ONEMKL::SYCL::SYCL INTERFACE IMPORTED)
131134
else()
132135
# Find necessary packages
133-
if (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "hipSYCL")
136+
if (${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipSYCL")
134137
message(STATUS "Looking for hipSYCL")
135138
find_package(hipSYCL CONFIG REQUIRED)
136139
set(USE_ADD_SYCL_TO_TARGET_INTEGRATION true)
140+
set(DISABLE_HALF_RUTINES ON)
137141
add_library(ONEMKL::SYCL::SYCL INTERFACE IMPORTED)
138-
elseif(ONEMKL_SYCL_IMPLEMENTATION STREQUAL "dpc++")
142+
elseif(${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "dpc++")
139143
message(STATUS "Looking for dpc++")
140144
set(USE_ADD_SYCL_TO_TARGET_INTEGRATION false)
141145
find_package(Compiler REQUIRED)

0 commit comments

Comments
 (0)