Skip to content

Commit ba8c5c8

Browse files
omarahmed1111veselypetacallumfareaarongreig
authored
[SYCL][HIP] Port HIP plugin to Unified Runtime (#9617)
This moves the HIP plugin implementation to Unified Runtime; and changes the pi_hip 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 CUDA adapter (#9512) so will only be ready when that is merged. --------- Co-authored-by: Omar Ahmed <[email protected]> Co-authored-by: Petr Vesely <[email protected]> Co-authored-by: Callum Fare <[email protected]> Co-authored-by: Aaron Greig <[email protected]>
1 parent 5b501ee commit ba8c5c8

32 files changed

+6815
-6871
lines changed

sycl/plugins/hip/CMakeLists.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,46 @@ set(HIP_HEADERS "${PI_HIP_INCLUDE_DIR};${PI_HIP_HSA_INCLUDE_DIR}")
8787
# Create pi_hip library
8888
add_sycl_plugin(hip
8989
SOURCES
90+
# Some code is shared with the UR adapter
91+
"../unified_runtime/pi2ur.hpp"
92+
"../unified_runtime/pi2ur.cpp"
93+
"../unified_runtime/ur/ur.hpp"
94+
"../unified_runtime/ur/ur.cpp"
95+
"../unified_runtime/ur/adapters/hip/common.cpp"
96+
"../unified_runtime/ur/adapters/hip/common.hpp"
97+
"../unified_runtime/ur/adapters/hip/context.cpp"
98+
"../unified_runtime/ur/adapters/hip/context.hpp"
99+
"../unified_runtime/ur/adapters/hip/device.cpp"
100+
"../unified_runtime/ur/adapters/hip/device.hpp"
101+
"../unified_runtime/ur/adapters/hip/enqueue.cpp"
102+
"../unified_runtime/ur/adapters/hip/event.cpp"
103+
"../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/memory.cpp"
107+
"../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/program.cpp"
112+
"../unified_runtime/ur/adapters/hip/program.hpp"
113+
"../unified_runtime/ur/adapters/hip/kernel.cpp"
114+
"../unified_runtime/ur/adapters/hip/kernel.hpp"
115+
"../unified_runtime/ur/adapters/hip/queue.cpp"
116+
"../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"
120+
"../unified_runtime/ur/adapters/hip/ur_interface_loader.cpp"
90121
"${sycl_inc_dir}/sycl/detail/pi.h"
91122
"${sycl_inc_dir}/sycl/detail/pi.hpp"
92123
"pi_hip.hpp"
93124
"pi_hip.cpp"
94125
INCLUDE_DIRS
95126
${sycl_plugin_dir}
127+
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime
128+
LIBRARIES
129+
UnifiedRuntime-Headers
96130
HEADER
97131
${CMAKE_CURRENT_SOURCE_DIR}/include/features.hpp
98132
)

0 commit comments

Comments
 (0)