Skip to content

Commit e1705eb

Browse files
authored
[SYCL][E2E] Update is_compatible tests (#17606)
Due to incorrect REQUIRES these tests are never launched.
1 parent 2dbaf98 commit e1705eb

File tree

7 files changed

+28
-39
lines changed

7 files changed

+28
-39
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// REQUIRES: target-amd, opencl, gpu, cpu
1+
// UNSUPPORTED: windows
2+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17515
3+
// There are no ROCm libs on win machines, so the compilation fails.
24

3-
// RUN: %clangxx -fsycl -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx906 -fsycl-targets=amdgcn-amd-amdhsa %S/Inputs/is_compatible_with_env.cpp -o %t.out
5+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1030 %S/Inputs/is_compatible_with_env.cpp -o %t.out
46

5-
// RUN: env ONEAPI_DEVICE_SELECTOR=hip:gpu %{run} %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} not %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
7+
// RUN: %if !hip %{ not %} %{run} %t.out
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// REQUIRES: target-nvidia, opencl, gpu, cpu
1+
// UNSUPPORTED: windows
2+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17515
3+
// There are no CUDA libs on win machines, so the compilation fails.
24

35
// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/is_compatible_with_env.cpp -o %t.out
46

5-
// RUN: env ONEAPI_DEVICE_SELECTOR=cuda:gpu %{run} %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} not %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
7+
// RUN: %if !cuda %{ not %} %{run} %t.out
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// REQUIRES: ocloc, any-device-is-level_zero, any-device-is-gpu, any-device-is-cpu
1+
// REQUIRES: opencl-aot, ocloc
22

3-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out
3+
// UNSUPPORTED: windows
4+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17515
5+
// There is no CPU device on win yet, so opencl-aot fails to compile the kernel.
46

5-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run-unfiltered-devices} not %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run-unfiltered-devices} %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run-unfiltered-devices} %t.out
7+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %S/Inputs/is_compatible_with_env.cpp -o %t.out
8+
9+
// RUN: %if !(level_zero || opencl) %{ not %} %{run} %t.out
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// REQUIRES: cuda, opencl, gpu, cpu
2-
31
// RUN: %clangxx -fsycl -fsycl-targets=spir64 %S/Inputs/is_compatible_with_env.cpp -o %t.out
42

5-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=cuda:gpu %{run} not %t.out
3+
// RUN: %if hip || cuda %{ not %} %{run} %t.out
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// REQUIRES: ocloc, gpu, level_zero, cpu
1+
// REQUIRES: ocloc
22

3-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out
44

5-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run} %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
5+
// RUN: %if !(level_zero || opencl && gpu) %{ not %} %{run} %t.out
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// REQUIRES: opencl-aot, cpu, gpu, level_zero
1+
// REQUIRES: opencl-aot
22

3-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/is_compatible_with_env.cpp -o %t.out
3+
// UNSUPPORTED: windows
4+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17515
5+
// There is no CPU device on win yet, so opencl-aot fails to compile the kernel.
46

5-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} not %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run} not %t.out
7+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/is_compatible_with_env.cpp -o %t.out
8+
9+
// RUN: %if !cpu %{ not %} %{run} %t.out

sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_with_aspects.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// requires: cpu, gpu, accelerator
21
// RUN: %{build} -Wno-error=incorrect-sub-group-size %O0 -o %t.out
32
// RUN: %{run} %t.out
43

@@ -7,11 +6,10 @@
76

87
[[sycl::device_has(sycl::aspect::cpu)]] void foo(){};
98
[[sycl::device_has(sycl::aspect::gpu)]] void bar(){};
10-
[[sycl::device_has(sycl::aspect::accelerator)]] void baz(){};
119

1210
class KernelCPU;
1311
class KernelGPU;
14-
class KernelACC;
12+
1513
class GoodWGSize;
1614
class WrongReqWGSize;
1715

@@ -40,13 +38,6 @@ int main() {
4038
Compatible &= Dev.is_gpu();
4139
Called = true;
4240
}
43-
if (sycl::is_compatible<KernelACC>(Dev)) {
44-
Q.submit(
45-
[&](sycl::handler &h) { h.single_task<KernelACC>([=]() { baz(); }); });
46-
Q.wait();
47-
Compatible &= Dev.is_accelerator();
48-
Called = true;
49-
}
5041

5142
if (sycl::is_compatible<GoodWGSize>(Dev)) {
5243
Q.submit([&](sycl::handler &h) {

0 commit comments

Comments
 (0)