Skip to content

Commit 8fad042

Browse files
fabiomestremartygrantPetr Veselycallumfareaarongreig
authored
[SYCL][OpenCL] Port OpenCL plugin to Unified Runtime (#10490)
Co-authored-by: Martin Morrison-Grant <[email protected]> Co-authored-by: Petr Vesely <[email protected]> Co-authored-by: Callum Fare <[email protected]> Co-authored-by: aarongreig <[email protected]>
1 parent 4ab7104 commit 8fad042

31 files changed

+6356
-2711
lines changed

sycl/plugins/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang|IntelLLVM" )
22
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-covered-switch-default")
33
endif()
44

5-
# level_zero plugin depends today on unified_runtime plugin
5+
# level_zero and opencl plugins depend today on unified_runtime plugin
66
# and unified_runtime plugin is not an independent plugin, adding it explicitly
7-
if ("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
7+
if ("level_zero" IN_LIST SYCL_ENABLE_PLUGINS OR "opencl" IN_LIST SYCL_ENABLE_PLUGINS)
88
add_subdirectory(unified_runtime)
99
endif()
1010

sycl/plugins/opencl/CMakeLists.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,41 @@
1212

1313
add_sycl_plugin(opencl
1414
SOURCES
15+
# Some code is shared with the UR adapter
16+
"../unified_runtime/pi2ur.hpp"
17+
"../unified_runtime/pi2ur.cpp"
18+
"../unified_runtime/ur/ur.hpp"
19+
"../unified_runtime/ur/ur.cpp"
20+
"../unified_runtime/ur/adapters/opencl/adapter.cpp"
21+
"../unified_runtime/ur/adapters/opencl/adapter.hpp"
22+
"../unified_runtime/ur/adapters/opencl/common.cpp"
23+
"../unified_runtime/ur/adapters/opencl/common.hpp"
24+
"../unified_runtime/ur/adapters/opencl/context.cpp"
25+
"../unified_runtime/ur/adapters/opencl/context.hpp"
26+
"../unified_runtime/ur/adapters/opencl/device.cpp"
27+
"../unified_runtime/ur/adapters/opencl/device.hpp"
28+
"../unified_runtime/ur/adapters/opencl/enqueue.cpp"
29+
"../unified_runtime/ur/adapters/opencl/image.cpp"
30+
"../unified_runtime/ur/adapters/opencl/kernel.cpp"
31+
"../unified_runtime/ur/adapters/opencl/platform.cpp"
32+
"../unified_runtime/ur/adapters/opencl/platform.hpp"
33+
"../unified_runtime/ur/adapters/opencl/sampler.cpp"
34+
"../unified_runtime/ur/adapters/opencl/memory.cpp"
35+
"../unified_runtime/ur/adapters/opencl/usm.cpp"
36+
"../unified_runtime/ur/adapters/opencl/program.cpp"
37+
"../unified_runtime/ur/adapters/opencl/event.cpp"
38+
"../unified_runtime/ur/adapters/opencl/queue.cpp"
39+
"../unified_runtime/ur/adapters/opencl/command_buffer.hpp"
40+
"../unified_runtime/ur/adapters/opencl/command_buffer.cpp"
41+
"../unified_runtime/ur/adapters/opencl/usm_p2p.cpp"
42+
# ---
1543
"${sycl_inc_dir}/sycl/detail/pi.h"
1644
"pi_opencl.cpp"
45+
INCLUDE_DIRS
46+
${sycl_inc_dir}
47+
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime
1748
LIBRARIES
49+
UnifiedRuntime-Headers
1850
OpenCL-ICD
1951
)
2052

0 commit comments

Comments
 (0)