We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee21d66 commit b217bc5Copy full SHA for b217bc5
sycl/source/device_selector.cpp
@@ -6,6 +6,7 @@
6
//
7
//===----------------------------------------------------------------------===//
8
9
+#include <CL/sycl/detail/force_device.hpp>
10
#include <CL/sycl/device.hpp>
11
#include <CL/sycl/device_selector.hpp>
12
#include <CL/sycl/exception.hpp>
@@ -54,12 +55,13 @@ int default_selector::operator()(const device &dev) const {
54
55
}
56
57
58
+ // override always wins
59
+ if (dev.get_info<info::device::device_type>() == detail::get_forced_type())
60
+ return 1000;
61
+
62
if (dev.is_gpu())
63
return 500;
64
- if (dev.is_accelerator())
- return 400;
-
65
if (dev.is_cpu())
66
return 300;
67
0 commit comments