diff --git a/backends/source/dppl_sycl_queue_manager.cpp b/backends/source/dppl_sycl_queue_manager.cpp index e6f64457fa..b858701465 100644 --- a/backends/source/dppl_sycl_queue_manager.cpp +++ b/backends/source/dppl_sycl_queue_manager.cpp @@ -75,8 +75,15 @@ class QMgrHelper vector_class SelectedDevices; for(auto &d : Devices) { auto devty = d.get_info(); - if(devty == DTy && be == BE) + if(devty == DTy && be == BE) { SelectedDevices.push_back(d); + + // Workaround for situations when in some environments + // get_devices() returns each device TWICE. Then it fails in call + // for context constructor with all doubled devices. + // So use only one first device. + break; + } } if (SelectedDevices.size() > 0) { auto Ctx = context(SelectedDevices);