Skip to content

Commit 3a19259

Browse files
committed
compile for cuda if cublas enabled
1 parent 835888a commit 3a19259

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/FindCompiler.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ if(is_dpcpp)
3333
if(UNIX)
3434
set(UNIX_INTERFACE_COMPILE_OPTIONS -fsycl)
3535
set(UNIX_INTERFACE_LINK_OPTIONS -fsycl)
36-
if(ENABLE_CURAND_BACKEND)
36+
if(ENABLE_CURAND_BACKEND OR ENABLE_CUBLAS_BACKEND)
3737
list(APPEND UNIX_INTERFACE_COMPILE_OPTIONS
3838
-fsycl-targets=nvptx64-nvidia-cuda-sycldevice -fsycl-unnamed-lambda)
3939
list(APPEND UNIX_INTERFACE_LINK_OPTIONS
4040
-fsycl-targets=nvptx64-nvidia-cuda-sycldevice)
4141
endif()
42-
if(ENABLE_CURAND_BACKEND)
42+
if(ENABLE_CURAND_BACKEND OR ENABLE_CUBLAS_BACKEND)
4343
set_target_properties(ONEMKL::SYCL::SYCL PROPERTIES
4444
INTERFACE_COMPILE_OPTIONS "${UNIX_INTERFACE_COMPILE_OPTIONS}"
4545
INTERFACE_LINK_OPTIONS "${UNIX_INTERFACE_LINK_OPTIONS}"

0 commit comments

Comments
 (0)