Skip to content

Commit ec59d44

Browse files
callumfarePetr Veselyomarahmed1111martygrantaarongreig
authored
[SYCL][CUDA] Port CUDA plugin to Unified Runtime (#9512)
This moves the CUDA plugin implementation to Unified Runtime; and changes the pi_cuda plugin to use pi2ur to implement PI. The changes to the implementation have been kept to a minimum and should be functionally the same. Documentation and comments have been moved verbatim, other than changing PI references to UR. This PR is based on top of the Level Zero adapter (#8744) so will only be ready when that is merged. --------- Co-authored-by: Petr Vesely <[email protected]> Co-authored-by: Omar Ahmed <[email protected]> Co-authored-by: Martin Morrison-Grant <[email protected]> Co-authored-by: Aaron Greig <[email protected]>
1 parent c87e780 commit ec59d44

32 files changed

+7445
-6960
lines changed

sycl/plugins/cuda/CMakeLists.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,51 @@ endif()
4848

4949
add_sycl_plugin(cuda
5050
SOURCES
51+
# Some code is shared with the UR adapter
52+
"../unified_runtime/pi2ur.hpp"
53+
"../unified_runtime/pi2ur.cpp"
54+
"../unified_runtime/ur/ur.hpp"
55+
"../unified_runtime/ur/ur.cpp"
56+
"../unified_runtime/ur/usm_allocator.cpp"
57+
"../unified_runtime/ur/usm_allocator.hpp"
58+
"../unified_runtime/ur/adapters/cuda/common.cpp"
59+
"../unified_runtime/ur/adapters/cuda/common.hpp"
60+
"../unified_runtime/ur/adapters/cuda/context.cpp"
61+
"../unified_runtime/ur/adapters/cuda/context.hpp"
62+
"../unified_runtime/ur/adapters/cuda/device.cpp"
63+
"../unified_runtime/ur/adapters/cuda/device.hpp"
64+
"../unified_runtime/ur/adapters/cuda/enqueue.cpp"
65+
"../unified_runtime/ur/adapters/cuda/event.cpp"
66+
"../unified_runtime/ur/adapters/cuda/event.hpp"
67+
"../unified_runtime/ur/adapters/cuda/kernel.cpp"
68+
"../unified_runtime/ur/adapters/cuda/kernel.hpp"
69+
"../unified_runtime/ur/adapters/cuda/memory.cpp"
70+
"../unified_runtime/ur/adapters/cuda/memory.hpp"
71+
"../unified_runtime/ur/adapters/cuda/platform.cpp"
72+
"../unified_runtime/ur/adapters/cuda/platform.hpp"
73+
"../unified_runtime/ur/adapters/cuda/program.cpp"
74+
"../unified_runtime/ur/adapters/cuda/program.hpp"
75+
"../unified_runtime/ur/adapters/cuda/queue.cpp"
76+
"../unified_runtime/ur/adapters/cuda/queue.hpp"
77+
"../unified_runtime/ur/adapters/cuda/sampler.cpp"
78+
"../unified_runtime/ur/adapters/cuda/sampler.hpp"
79+
"../unified_runtime/ur/adapters/cuda/tracing.cpp"
80+
"../unified_runtime/ur/adapters/cuda/ur_interface_loader.cpp"
81+
"../unified_runtime/ur/adapters/cuda/usm.cpp"
82+
# ---
5183
"${sycl_inc_dir}/sycl/detail/pi.h"
5284
"${sycl_inc_dir}/sycl/detail/pi.hpp"
5385
"pi_cuda.hpp"
5486
"pi_cuda.cpp"
55-
"tracing.cpp"
5687
${XPTI_PROXY_SRC}
5788
INCLUDE_DIRS
5889
${sycl_inc_dir}
5990
${XPTI_INCLUDE}
91+
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime
6092
LIBRARIES
6193
cudadrv
6294
${XPTI_LIBS}
95+
UnifiedRuntime-Headers
6396
HEADER "${CMAKE_CURRENT_SOURCE_DIR}/include/features.hpp"
6497
)
6598

0 commit comments

Comments
 (0)