Skip to content

Commit 2da85e1

Browse files
authored
[SYCL][PI] Restore CUDA and HIP plugin ABI (#10518)
During the port to UR the CUDA and HIP PI plugin ABI's were unintentionally changed. There does not appear to be symbol checks for these plugins, unlike the [Level Zero symbol check](https://github.com/intel/llvm/blob/sycl/sycl/test/abi/pi_level_zero_symbol_check.dump) and [OpenCL symbol check](https://github.com/intel/llvm/blob/sycl/sycl/test/abi/pi_opencl_symbol_check.dump). As such, the ABI change went unnoticed until #10490 was opened using the same approach for the OpenCL port, which [failed](https://github.com/intel/llvm/actions/runs/5610646255/job/15200624025?pr=10490) the OpenCL symbol check. This PR restores the expected ABI for the CUDA and HIP plugins and introduces new CUDA and HIP symbol check tests.
1 parent 1c892f9 commit 2da85e1

File tree

10 files changed

+2881
-379
lines changed

10 files changed

+2881
-379
lines changed

sycl/plugins/cuda/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ add_sycl_plugin(cuda
5555
"../unified_runtime/ur/ur.cpp"
5656
"../unified_runtime/ur/usm_allocator.cpp"
5757
"../unified_runtime/ur/usm_allocator.hpp"
58+
"../unified_runtime/ur/adapters/cuda/command_buffer.cpp"
59+
"../unified_runtime/ur/adapters/cuda/command_buffer.hpp"
5860
"../unified_runtime/ur/adapters/cuda/common.cpp"
5961
"../unified_runtime/ur/adapters/cuda/common.hpp"
6062
"../unified_runtime/ur/adapters/cuda/context.cpp"
@@ -81,8 +83,6 @@ add_sycl_plugin(cuda
8183
"../unified_runtime/ur/adapters/cuda/tracing.cpp"
8284
"../unified_runtime/ur/adapters/cuda/ur_interface_loader.cpp"
8385
"../unified_runtime/ur/adapters/cuda/usm.cpp"
84-
"../unified_runtime/ur/adapters/cuda/command_buffer.hpp"
85-
"../unified_runtime/ur/adapters/cuda/command_buffer.cpp"
8686
"../unified_runtime/ur/adapters/cuda/usm_p2p.cpp"
8787
# ---
8888
"${sycl_inc_dir}/sycl/detail/pi.h"

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 1163 additions & 190 deletions
Large diffs are not rendered by default.

sycl/plugins/hip/CMakeLists.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ add_sycl_plugin(hip
9292
"../unified_runtime/pi2ur.cpp"
9393
"../unified_runtime/ur/ur.hpp"
9494
"../unified_runtime/ur/ur.cpp"
95+
"../unified_runtime/ur/adapters/hip/command_buffer.cpp"
96+
"../unified_runtime/ur/adapters/hip/command_buffer.hpp"
9597
"../unified_runtime/ur/adapters/hip/common.cpp"
9698
"../unified_runtime/ur/adapters/hip/common.hpp"
9799
"../unified_runtime/ur/adapters/hip/context.cpp"
@@ -101,23 +103,22 @@ add_sycl_plugin(hip
101103
"../unified_runtime/ur/adapters/hip/enqueue.cpp"
102104
"../unified_runtime/ur/adapters/hip/event.cpp"
103105
"../unified_runtime/ur/adapters/hip/event.hpp"
104-
"../unified_runtime/ur/adapters/hip/platform.cpp"
105-
"../unified_runtime/ur/adapters/hip/platform.hpp"
106+
"../unified_runtime/ur/adapters/hip/image.cpp"
107+
"../unified_runtime/ur/adapters/hip/kernel.cpp"
108+
"../unified_runtime/ur/adapters/hip/kernel.hpp"
106109
"../unified_runtime/ur/adapters/hip/memory.cpp"
107110
"../unified_runtime/ur/adapters/hip/memory.hpp"
108-
"../unified_runtime/ur/adapters/hip/sampler.cpp"
109-
"../unified_runtime/ur/adapters/hip/sampler.hpp"
110-
"../unified_runtime/ur/adapters/hip/usm.cpp"
111+
"../unified_runtime/ur/adapters/hip/platform.cpp"
112+
"../unified_runtime/ur/adapters/hip/platform.hpp"
111113
"../unified_runtime/ur/adapters/hip/program.cpp"
112114
"../unified_runtime/ur/adapters/hip/program.hpp"
113-
"../unified_runtime/ur/adapters/hip/kernel.cpp"
114-
"../unified_runtime/ur/adapters/hip/kernel.hpp"
115115
"../unified_runtime/ur/adapters/hip/queue.cpp"
116116
"../unified_runtime/ur/adapters/hip/queue.hpp"
117-
"../unified_runtime/ur/adapters/hip/command_buffer.cpp"
118-
"../unified_runtime/ur/adapters/hip/command_buffer.hpp"
119-
"../unified_runtime/ur/adapters/hip/usm_p2p.cpp"
117+
"../unified_runtime/ur/adapters/hip/sampler.cpp"
118+
"../unified_runtime/ur/adapters/hip/sampler.hpp"
120119
"../unified_runtime/ur/adapters/hip/ur_interface_loader.cpp"
120+
"../unified_runtime/ur/adapters/hip/usm.cpp"
121+
"../unified_runtime/ur/adapters/hip/usm_p2p.cpp"
121122
"${sycl_inc_dir}/sycl/detail/pi.h"
122123
"${sycl_inc_dir}/sycl/detail/pi.hpp"
123124
"pi_hip.hpp"

0 commit comments

Comments
 (0)