File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
test-e2e/OptionalKernelFeatures/is_compatible Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ std::vector<kernel_id> get_kernel_ids() {
292
292
293
293
bool is_compatible (const std::vector<kernel_id> &KernelIDs, const device &Dev) {
294
294
if (KernelIDs.empty ())
295
- return false ;
295
+ return true ;
296
296
// TODO: also need to check that the architecture specified by the
297
297
// "-fsycl-targets" flag matches the device when we are able to get the
298
298
// device's arch.
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ int main() {
24
24
sycl::device Dev;
25
25
sycl::queue Q (Dev);
26
26
27
+ // Returns true for empty vector of kernels
28
+ assert (sycl::is_compatible ({}, Dev));
29
+
27
30
if (sycl::is_compatible<KernelCPU>(Dev)) {
28
31
Q.submit (
29
32
[&](sycl::handler &h) { h.single_task <KernelCPU>([=]() { foo (); }); });
You can’t perform that action at this time.
0 commit comments