@@ -4,13 +4,11 @@ if (NOT DEFINED UNIFIED_RUNTIME_LIBRARY OR NOT DEFINED UNIFIED_RUNTIME_INCLUDE_D
4
4
include (FetchContent )
5
5
6
6
set (UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git" )
7
- #commit b38855ed815ffd076bfde5e5e06170ca4f723dc1
8
- #Merge: e6343f4 6a2c548
9
- #Author: Piotr Balcer <piotr.balcer@intel.com>
10
- #Date: Thu Oct 5 12:15:42 2023 +0200
11
- # Merge pull request #920 from jsji/localcopy
12
- # [UR][L0] Copy prebuilt L0 to avoid leaking shared folder path
13
- set (UNIFIED_RUNTIME_TAG b38855ed815ffd076bfde5e5e06170ca4f723dc1 )
7
+ # commit 3653e582e00737302ba0469a978aadc16448b3ea
8
+ # Author: Fabio <fabio.mestre@codeplay.com>
9
+ # Date: Wed Oct 18 16:25:29 2023 +0100
10
+ # [OpenCL] Allow upstream to manually set the OpenCL target (#969)
11
+ set (UNIFIED_RUNTIME_TAG 3653e582e00737302ba0469a978aadc16448b3ea )
14
12
15
13
if ("level_zero" IN_LIST SYCL_ENABLE_PLUGINS )
16
14
set (UR_BUILD_ADAPTER_L0 ON )
@@ -23,6 +21,12 @@ if (NOT DEFINED UNIFIED_RUNTIME_LIBRARY OR NOT DEFINED UNIFIED_RUNTIME_INCLUDE_D
23
21
if ("hip" IN_LIST SYCL_ENABLE_PLUGINS )
24
22
set (UR_BUILD_ADAPTER_HIP ON )
25
23
endif ()
24
+
25
+ if ("opencl" IN_LIST SYCL_ENABLE_PLUGINS )
26
+ set (UR_BUILD_ADAPTER_OPENCL ON )
27
+ set (UR_OPENCL_ICD_LOADER_LIBRARY OpenCL-ICD )
28
+ endif ()
29
+
26
30
set (UMF_ENABLE_POOL_TRACKING ON )
27
31
message (STATUS "Will fetch Unified Runtime from ${UNIFIED_RUNTIME_REPO} " )
28
32
FetchContent_Declare (unified-runtime
@@ -115,50 +119,7 @@ if ("cuda" IN_LIST SYCL_ENABLE_PLUGINS)
115
119
endif ()
116
120
117
121
if ("opencl" IN_LIST SYCL_ENABLE_PLUGINS )
118
- # Build OpenCL adapter
119
- add_sycl_library ("ur_adapter_opencl" SHARED
120
- SOURCES
121
- "ur/ur.hpp"
122
- "ur/ur.cpp"
123
- "ur/adapters/opencl/adapter.cpp"
124
- "ur/adapters/opencl/adapter.hpp"
125
- "ur/adapters/opencl/command_buffer.hpp"
126
- "ur/adapters/opencl/command_buffer.cpp"
127
- "ur/adapters/opencl/common.cpp"
128
- "ur/adapters/opencl/common.hpp"
129
- "ur/adapters/opencl/context.cpp"
130
- "ur/adapters/opencl/context.hpp"
131
- "ur/adapters/opencl/device.cpp"
132
- "ur/adapters/opencl/device.hpp"
133
- "ur/adapters/opencl/enqueue.cpp"
134
- "ur/adapters/opencl/event.cpp"
135
- "ur/adapters/opencl/image.cpp"
136
- "ur/adapters/opencl/kernel.cpp"
137
- "ur/adapters/opencl/memory.cpp"
138
- "ur/adapters/opencl/platform.cpp"
139
- "ur/adapters/opencl/platform.hpp"
140
- "ur/adapters/opencl/program.cpp"
141
- "ur/adapters/opencl/queue.cpp"
142
- "ur/adapters/opencl/sampler.cpp"
143
- "ur/adapters/opencl/ur_interface_loader.cpp"
144
- "ur/adapters/opencl/usm.cpp"
145
- "ur/adapters/opencl/usm_p2p.cpp"
146
- INCLUDE_DIRS
147
- ${sycl_inc_dir}
148
- LIBRARIES
149
- UnifiedRuntime-Headers
150
- Threads::Threads
151
- OpenCL-ICD
152
- )
153
-
154
- # Suppress a compiler message about undefined CL_TARGET_OPENCL_VERSION.
155
- # Define all symbols up to OpenCL 3.0.
156
- target_compile_definitions (ur_adapter_opencl PRIVATE CL_TARGET_OPENCL_VERSION=300 )
157
-
158
- set_target_properties ("ur_adapter_opencl" PROPERTIES
159
- VERSION "0.0.0"
160
- SOVERSION "0"
161
- )
122
+ add_dependencies (sycl-runtime-libraries ur_adapter_opencl )
162
123
endif ()
163
124
164
125
if ("native_cpu" IN_LIST SYCL_ENABLE_PLUGINS )
0 commit comments