We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e25253 commit 7c311f4Copy full SHA for 7c311f4
backends/source/dppl_sycl_queue_manager.cpp
@@ -75,8 +75,15 @@ class QMgrHelper
75
vector_class<device> SelectedDevices;
76
for(auto &d : Devices) {
77
auto devty = d.get_info<info::device::device_type>();
78
- if(devty == DTy && be == BE)
+ if(devty == DTy && be == BE) {
79
SelectedDevices.push_back(d);
80
+
81
+ // Workaround for situations when in some environments
82
+ // get_devices() returns each device TWICE. Then it fails in call
83
+ // for context constructor with all doubled devices.
84
+ // So use only one first device.
85
+ break;
86
+ }
87
}
88
if (SelectedDevices.size() > 0) {
89
auto Ctx = context(SelectedDevices);
0 commit comments