Skip to content

Commit

Permalink
[SYCL][CUDA] Don't link pi_cuda against libsycl (intel#5908)
Browse files Browse the repository at this point in the history
The plugins are dynamically loaded and shouldn't be linked against
libsycl.

In this case it meant that a build of libsycl with the CUDA plugin
enabled was unusable on a system where CUDA isn't installed, even when
using other plugins or the host device.

When the plugins are dynamically loaded, if some dependencies are
missing the plugins will just be skipped instead of crashing the
application.
  • Loading branch information
npmiller authored Apr 1, 2022
1 parent dba0894 commit 6821e66
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sycl/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ function(add_sycl_rt_library LIB_NAME)
OpenCL-ICD
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
PUBLIC
$<$<BOOL:${SYCL_BUILD_PI_CUDA}>:pi_cuda>
)

add_common_options(${LIB_NAME} ${LIB_OBJ_NAME})
Expand Down

0 comments on commit 6821e66

Please sign in to comment.