Skip to content

Commit 6c8b622

Browse files
authored
[SYCL][CUDA] Allow to use CUDA backend in all builds (#3811)
1 parent af1e131 commit 6c8b622

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

sycl/plugins/cuda/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,3 @@ install(TARGETS pi_cuda
4343
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT pi_cuda
4444
RUNTIME DESTINATION "bin" COMPONENT pi_cuda
4545
)
46-
47-
# `sycl/source/CMakeLists.txt` adapted when SYCL_BUILD_PI_CUDA is defined:
48-
# target_link_libraries(sycl PUBLIC pi_cuda)
49-
# target_compile_definitions(sycl PUBLIC USE_PI_CUDA)

sycl/source/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ function(add_sycl_rt_library LIB_NAME)
8282
$<$<BOOL:${SYCL_BUILD_PI_CUDA}>:pi_cuda>
8383
)
8484

85-
target_compile_definitions(${LIB_OBJ_NAME}
86-
PUBLIC
87-
$<$<BOOL:${SYCL_BUILD_PI_CUDA}>:USE_PI_CUDA>)
88-
8985
add_common_options(${LIB_NAME} ${LIB_OBJ_NAME})
9086

9187
set_target_properties(${LIB_NAME} PROPERTIES

sycl/source/detail/context_impl.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ context_impl::context_impl(const vector_class<cl::sycl::device> Devices,
4545

4646
const auto Backend = getPlugin().getBackend();
4747
if (Backend == backend::cuda) {
48-
#if USE_PI_CUDA
4948
const bool UseCUDAPrimaryContext =
5049
MPropList.has_property<property::context::cuda::use_primary_context>();
5150
const pi_context_properties Props[] = {
@@ -55,10 +54,6 @@ context_impl::context_impl(const vector_class<cl::sycl::device> Devices,
5554

5655
getPlugin().call<PiApiKind::piContextCreate>(
5756
Props, DeviceIds.size(), DeviceIds.data(), nullptr, nullptr, &MContext);
58-
#else
59-
cl::sycl::detail::pi::die(
60-
"CUDA support was not enabled at compilation time");
61-
#endif
6257
} else {
6358
getPlugin().call<PiApiKind::piContextCreate>(nullptr, DeviceIds.size(),
6459
DeviceIds.data(), nullptr,

0 commit comments

Comments
 (0)