@@ -278,26 +278,13 @@ std::vector<std::pair<std::string, backend>> findPlugins() {
278
278
// search is done for libpi_opencl.so/pi_opencl.dll file in LD_LIBRARY_PATH
279
279
// env only.
280
280
//
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;
295
281
device_filter_list *FilterList = SYCLConfig<SYCL_DEVICE_FILTER>::get ();
296
282
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);
301
288
} else {
302
289
std::vector<device_filter> Filters = FilterList->get ();
303
290
bool OpenCLFound = false ;
@@ -308,20 +295,21 @@ std::vector<std::pair<std::string, backend>> findPlugins() {
308
295
backend Backend = Filter.Backend ;
309
296
if (!OpenCLFound &&
310
297
(Backend == backend::opencl || Backend == backend::all)) {
311
- PluginNames.emplace_back (OpenCLPluginName , backend::opencl);
298
+ PluginNames.emplace_back (__SYCL_OPENCL_PLUGIN_NAME , backend::opencl);
312
299
OpenCLFound = true ;
313
300
}
314
301
if (!LevelZeroFound &&
315
302
(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);
317
305
LevelZeroFound = true ;
318
306
}
319
307
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);
321
309
CudaFound = true ;
322
310
}
323
311
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);
325
313
HIPFound = true ;
326
314
}
327
315
}
0 commit comments