Skip to content

Commit d2e5792

Browse files
Disallow HIP/CUDA targets without oneMKL interface flag
1 parent 07639f6 commit d2e5792

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,10 @@ else()
104104
set(_dpnp_sycl_targets ${DPNP_SYCL_TARGETS})
105105

106106
if ("${DPNP_SYCL_TARGETS}" MATCHES "nvptx64-nvidia-cuda")
107-
set(_use_onemkl_interfaces ON)
108107
set(_use_onemkl_interfaces_cuda ON)
109108
endif()
110109

111110
if ("${DPNP_SYCL_TARGETS}" MATCHES "amd_gpu_")
112-
set(_use_onemkl_interfaces ON)
113111
set(_use_onemkl_interfaces_hip ON)
114112

115113
if ("x${HIP_TARGETS}" STREQUAL "x")
@@ -178,6 +176,13 @@ if(_use_onemkl_interfaces)
178176
endif()
179177
message(STATUS "MKL interfaces lib target used: ${MKL_INTERFACES_LIB}")
180178
set(CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR}/lib")
179+
else()
180+
if(_use_onemkl_interfaces_cuda OR _use_onemkl_interfaces_hip)
181+
message(FATAL_ERROR
182+
"CUDA or HIP targets are enabled, but oneMKL Interfaces are not. "
183+
"Please set DPNP_USE_ONEMKL_INTERFACES=ON to enable them."
184+
)
185+
endif()
181186
endif()
182187

183188
if(WIN32)

0 commit comments

Comments
 (0)