Skip to content

Commit c408e03

Browse files
author
Alexander Batashev
authored
Revert "[SYCL] Allow overriding plugin libraries (#4067)" (#4659)
This reverts commit 29f3a92. There're ways of achieving the same without SYCL runtime modifications.
1 parent 6f620a4 commit c408e03

File tree

4 files changed

+10
-85
lines changed

4 files changed

+10
-85
lines changed

sycl/source/detail/config.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,4 @@ CONFIG(SYCL_CACHE_THRESHOLD, 16, __SYCL_CACHE_THRESHOLD)
3434
CONFIG(SYCL_CACHE_MIN_DEVICE_IMAGE_SIZE, 16, __SYCL_CACHE_MIN_DEVICE_IMAGE_SIZE)
3535
CONFIG(SYCL_CACHE_MAX_DEVICE_IMAGE_SIZE, 16, __SYCL_CACHE_MAX_DEVICE_IMAGE_SIZE)
3636
CONFIG(INTEL_ENABLE_OFFLOAD_ANNOTATIONS, 1, __SYCL_INTEL_ENABLE_OFFLOAD_ANNOTATIONS)
37-
CONFIG(SYCL_OVERRIDE_PI_OPENCL, 1024, __SYCL_OVERRIDE_PI_OPENCL)
38-
CONFIG(SYCL_OVERRIDE_PI_LEVEL_ZERO, 1024, __SYCL_OVERRIDE_PI_LEVEL_ZERO)
39-
CONFIG(SYCL_OVERRIDE_PI_CUDA, 1024, __SYCL_OVERRIDE_PI_CUDA)
40-
CONFIG(SYCL_OVERRIDE_PI_HIP, 1024, __SYCL_OVERRIDE_PI_HIP)
4137
CONFIG(SYCL_ENABLE_DEFAULT_CONTEXTS, 1, __SYCL_ENABLE_DEFAULT_CONTEXTS)

sycl/source/detail/pi.cpp

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -278,26 +278,13 @@ std::vector<std::pair<std::string, backend>> findPlugins() {
278278
// search is done for libpi_opencl.so/pi_opencl.dll file in LD_LIBRARY_PATH
279279
// env only.
280280
//
281-
const char *OpenCLPluginName =
282-
SYCLConfig<SYCL_OVERRIDE_PI_OPENCL>::get()
283-
? SYCLConfig<SYCL_OVERRIDE_PI_OPENCL>::get()
284-
: __SYCL_OPENCL_PLUGIN_NAME;
285-
const char *L0PluginName =
286-
SYCLConfig<SYCL_OVERRIDE_PI_LEVEL_ZERO>::get()
287-
? SYCLConfig<SYCL_OVERRIDE_PI_LEVEL_ZERO>::get()
288-
: __SYCL_LEVEL_ZERO_PLUGIN_NAME;
289-
const char *CUDAPluginName = SYCLConfig<SYCL_OVERRIDE_PI_CUDA>::get()
290-
? SYCLConfig<SYCL_OVERRIDE_PI_CUDA>::get()
291-
: __SYCL_CUDA_PLUGIN_NAME;
292-
const char *HIPPluginName = SYCLConfig<SYCL_OVERRIDE_PI_HIP>::get()
293-
? SYCLConfig<SYCL_OVERRIDE_PI_HIP>::get()
294-
: __SYCL_HIP_PLUGIN_NAME;
295281
device_filter_list *FilterList = SYCLConfig<SYCL_DEVICE_FILTER>::get();
296282
if (!FilterList) {
297-
PluginNames.emplace_back(OpenCLPluginName, backend::opencl);
298-
PluginNames.emplace_back(L0PluginName, backend::level_zero);
299-
PluginNames.emplace_back(CUDAPluginName, backend::cuda);
300-
PluginNames.emplace_back(HIPPluginName, backend::hip);
283+
PluginNames.emplace_back(__SYCL_OPENCL_PLUGIN_NAME, backend::opencl);
284+
PluginNames.emplace_back(__SYCL_LEVEL_ZERO_PLUGIN_NAME,
285+
backend::level_zero);
286+
PluginNames.emplace_back(__SYCL_CUDA_PLUGIN_NAME, backend::cuda);
287+
PluginNames.emplace_back(__SYCL_HIP_PLUGIN_NAME, backend::hip);
301288
} else {
302289
std::vector<device_filter> Filters = FilterList->get();
303290
bool OpenCLFound = false;
@@ -308,20 +295,21 @@ std::vector<std::pair<std::string, backend>> findPlugins() {
308295
backend Backend = Filter.Backend;
309296
if (!OpenCLFound &&
310297
(Backend == backend::opencl || Backend == backend::all)) {
311-
PluginNames.emplace_back(OpenCLPluginName, backend::opencl);
298+
PluginNames.emplace_back(__SYCL_OPENCL_PLUGIN_NAME, backend::opencl);
312299
OpenCLFound = true;
313300
}
314301
if (!LevelZeroFound &&
315302
(Backend == backend::level_zero || Backend == backend::all)) {
316-
PluginNames.emplace_back(L0PluginName, backend::level_zero);
303+
PluginNames.emplace_back(__SYCL_LEVEL_ZERO_PLUGIN_NAME,
304+
backend::level_zero);
317305
LevelZeroFound = true;
318306
}
319307
if (!CudaFound && (Backend == backend::cuda || Backend == backend::all)) {
320-
PluginNames.emplace_back(CUDAPluginName, backend::cuda);
308+
PluginNames.emplace_back(__SYCL_CUDA_PLUGIN_NAME, backend::cuda);
321309
CudaFound = true;
322310
}
323311
if (!HIPFound && (Backend == backend::hip || Backend == backend::all)) {
324-
PluginNames.emplace_back(HIPPluginName, backend::hip);
312+
PluginNames.emplace_back(__SYCL_HIP_PLUGIN_NAME, backend::hip);
325313
HIPFound = true;
326314
}
327315
}

sycl/test/basic_tests/plugin_overrides_negative.cpp

Lines changed: 0 additions & 16 deletions
This file was deleted.

sycl/test/basic_tests/plugin_overrides_positive.cpp

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)