Skip to content

Commit 481fd78

Browse files
committed
Require opencl-cpu-rt feature instead of XFAILing
1 parent 0f8ebbf commit 481fd78

File tree

10 files changed

+18
-39
lines changed

10 files changed

+18
-39
lines changed

sycl/test-e2e/AOT/cpu.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
//
77
//===---------------------------------------------------------------------===//
88

9-
// REQUIRES: opencl-aot, cpu
10-
11-
// XFAIL: windows && !(build-mode && run-mode)
12-
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
9+
// REQUIRES: opencl-aot, cpu, opencl-cpu-rt
1310

1411
// CPU AOT targets host isa, so we compile on the run system instead.
1512
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out

sycl/test-e2e/AOT/multiple-devices.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: opencl-aot, ocloc, cpu, gpu, target-spir
10-
11-
// XFAIL: windows && !(build-mode && run-mode)
12-
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
9+
// REQUIRES: opencl-aot, ocloc, cpu, gpu, target-spir, opencl-cpu-rt
1310

1411
// Produce a fat object for all targets (generic SPIR-V, CPU, GPU)
1512
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen %S/Inputs/aot.cpp -c -o %t.o

sycl/test-e2e/AOT/reqd-sg-size.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// This test ensures that a program that has a kernel
22
// using various required sub-group sizes can be compiled AOT.
33

4-
// XFAIL: windows && !(build-mode && run-mode)
5-
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
6-
7-
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
4+
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu, opencl-cpu-rt
85
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
96
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
107

sycl/test-e2e/E2EExpr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class E2EExpr(BooleanExpression):
1414
"any-target-is-nvidia",
1515
"any-target-is-amd",
1616
"any-target-is-native_cpu",
17+
"opencl-cpu-rt",
1718
"spirv-backend",
1819
"linux",
1920
"system-linux",

sycl/test-e2e/NewOffloadDriver/cpu.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
//
77
//===---------------------------------------------------------------------===//
88

9-
// REQUIRES: opencl-aot, cpu
10-
11-
// XFAIL: windows && !(build-mode && run-mode)
12-
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
9+
// REQUIRES: opencl-aot, cpu, opencl-cpu-rt
1310

1411
// CPU AOT targets host isa, so we compile on the run system instead.
1512
// Test with `--offload-new-driver`

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// REQUIRES: opencl-aot, ocloc
2-
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.
1+
// REQUIRES: opencl-aot, ocloc, opencl-cpu-rt
62

73
// 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
84

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// REQUIRES: opencl-aot
2-
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.
1+
// REQUIRES: opencl-aot, opencl-cpu-rt
62

73
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/is_compatible_with_env.cpp -o %t.out
84

sycl/test-e2e/ProgramManager/uneven_kernel_split.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// REQUIRES: any-device-is-cpu, gpu, opencl-aot, ocloc, target-spir
2-
3-
// XFAIL: windows && !(build-mode && run-mode)
4-
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
1+
// REQUIRES: any-device-is-cpu, gpu, opencl-aot, ocloc, target-spir, opencl-cpu-rt
52

63
// UNSUPPORTED: linux
74
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17305

sycl/test-e2e/SpecConstants/2020/non_native/multiple-targets.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// REQUIRES: opencl-aot, cpu, target-spir
2-
3-
// XFAIL: windows && !(build-mode && run-mode)
4-
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
1+
// REQUIRES: opencl-aot, cpu, target-spir, opencl-cpu-rt
52

63
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64 %S/Inputs/common.cpp -o %t_spv_cpu.out
74
// RUN: %{run} %t_spv_cpu.out

sycl/test-e2e/lit.cfg.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,17 @@ def open_check_file(file_name):
597597
if "amdgcn" in sp[1]:
598598
config.sycl_build_targets.add("target-amd")
599599

600+
cmd = ("{} {}".format(config.run_launcher, sycl_ls) if config.run_launcher else sycl_ls)
601+
sycl_ls_output = subprocess.check_output(cmd, text=True, shell=True)
602+
603+
# In contrast to `cpu` feature this is a compile-time feature, which is needed
604+
# to check if we can build cpu AOT tests.
605+
if "opencl:cpu" in sycl_ls_output:
606+
config.available_features.add("opencl-cpu-rt")
607+
600608
if len(config.sycl_devices) == 1 and config.sycl_devices[0] == "all":
601609
devices = set()
602-
cmd = (
603-
"{} {}".format(config.run_launcher, sycl_ls) if config.run_launcher else sycl_ls
604-
)
605-
sp = subprocess.check_output(cmd, text=True, shell=True)
606-
for line in sp.splitlines():
610+
for line in sycl_ls_output.splitlines():
607611
if not line.startswith("["):
608612
continue
609613
(backend, device) = line[1:].split("]")[0].split(":")

0 commit comments

Comments
 (0)