Skip to content

Commit 4df0958

Browse files
committed
Make the override always win
Signed-off-by: James Brodman <[email protected]>
1 parent 040edc2 commit 4df0958

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sycl/source/device_selector.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include <CL/sycl/detail/force_device.hpp>
910
#include <CL/sycl/device.hpp>
1011
#include <CL/sycl/device_selector.hpp>
1112
#include <CL/sycl/exception.hpp>
@@ -54,6 +55,10 @@ int default_selector::operator()(const device &dev) const {
5455
}
5556
}
5657

58+
// override always wins
59+
if (dev.get_info<info::device::device_type>() == detail::get_forced_type())
60+
return 1000;
61+
5762
if (dev.is_gpu())
5863
return 500;
5964

0 commit comments

Comments
 (0)