Skip to content

Commit 5ab196d

Browse files
authored
[SYCL][E2E] Clean-up test-modes by removing workarounds (#17023)
- Removes the `build-and-run-mode` feature from e2e lit infrastructure, as well as the remaining `REQUIRES: build-and-run-mode` markups found in tests. - Removes the `run-only` mode ignore line filtering workaround on `REQUIRES: build-and-run-mode`. - Adds `build-mode` to remove `test-mode-run-only` mode, this can be tested for by checking `run-mode && !build-mode`. - Marks CPU aot compilation lines with `%{run-aux}`, as those need to be compiled on a system with the same CPU isa as the running system.
1 parent ef28856 commit 5ab196d

37 files changed

+109
-120
lines changed

.github/workflows/sycl-linux-precommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
image: ${{ matrix.image }}
122122
image_options: ${{ matrix.image_options }}
123123
target_devices: ${{ matrix.target_devices }}
124-
extra_lit_opts: --param fallback-to-build-if-requires-build-and-run=True ${{ matrix.extra_lit_opts }}
124+
extra_lit_opts: ${{ matrix.extra_lit_opts }}
125125
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
126126
ref: ${{ github.sha }}
127127
sycl_toolchain_artifact: sycl_linux_default

sycl/test-e2e/AOT/cpu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
//===---------------------------------------------------------------------===//
88

99
// REQUIRES: opencl-aot, cpu
10-
// REQUIRES: build-and-run-mode
1110

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

1515
// Test that opencl-aot can handle multiple build options.

sycl/test-e2e/AOT/double.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// using fp64 can be compiled AOT.
33

44
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
5-
// REQUIRES: build-and-run-mode
65
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
7-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
6+
7+
// CPU AOT targets host isa, so we compile on the run system instead.
8+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
89
// RUN: %if cpu %{ %{run} %t.x86.out %}
910

1011
// ocloc on windows does not have support for PVC, so this command will

sycl/test-e2e/AOT/half.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// using fp16 can be compiled AOT.
33

44
// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
5-
// REQUIRES: build-and-run-mode
65
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
7-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
6+
7+
// CPU AOT targets host isa, so we compile on the run system instead.
8+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
89
// RUN: %if cpu %{ %{run} %t.x86.out %}
910

1011
// ocloc on windows does not have support for PVC, so this command will

sycl/test-e2e/Adapters/sycl-targets-order.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="opencl:*" %t-nvptx64-spir64.out
66
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="cuda:*" %t-nvptx64-spir64.out
77

8-
// REQUIRES: opencl, cuda
9-
// REQUIRES: build-and-run-mode
8+
// REQUIRES: opencl, target-spir, any-triple-is-nvidia
109

1110
//==------- sycl-targets-order.cpp - SYCL -fsycl-targets order test --------==//
1211
//
@@ -36,7 +35,7 @@ int main(int argc, char **argv) {
3635
sycl::buffer<unsigned int, 1> buffer(4);
3736

3837
// size of the index space for the kernel
39-
sycl::range<1> NumOfWorkItems{buffer.get_count()};
38+
sycl::range<1> NumOfWorkItems{buffer.size()};
4039

4140
// submit a command group(work) to the queue
4241
queue.submit([&](sycl::handler &cgh) {
@@ -55,7 +54,7 @@ int main(int argc, char **argv) {
5554

5655
// check the results
5756
bool mismatch = false;
58-
for (unsigned int i = 0; i < buffer.get_count(); ++i) {
57+
for (unsigned int i = 0; i < buffer.size(); ++i) {
5958
if (host_accessor[i] != i) {
6059
std::cout << "The result is incorrect for element: " << i
6160
<< " , expected: " << i << " , got: " << host_accessor[i]
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// REQUIRES: linux, opencl-aot, cpu
2-
// REQUIRES: build-and-run-mode
32

4-
// RUN: %{build} %device_asan_aot_flags -O0 -g %S/Inputs/host-usm-oob.cpp -o %t.out
3+
// RUN: %{run-aux} %{build} %device_asan_aot_flags -O0 -g %S/Inputs/host-usm-oob.cpp -o %t.out
54
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/Inputs/host-usm-oob.cpp
65

7-
// RUN: %{build} %device_asan_aot_flags -O1 -g %S/Inputs/host-usm-oob.cpp -o %t.out
6+
// RUN: %{run-aux} %{build} %device_asan_aot_flags -O1 -g %S/Inputs/host-usm-oob.cpp -o %t.out
87
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/Inputs/host-usm-oob.cpp
98

10-
// RUN: %{build} %device_asan_aot_flags -O2 -g %S/Inputs/host-usm-oob.cpp -o %t.out
9+
// RUN: %{run-aux} %{build} %device_asan_aot_flags -O2 -g %S/Inputs/host-usm-oob.cpp -o %t.out
1110
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/Inputs/host-usm-oob.cpp
1211

13-
// RUN: %{build} %device_asan_aot_flags -O3 -g %S/Inputs/host-usm-oob.cpp -o %t.out
12+
// RUN: %{run-aux} %{build} %device_asan_aot_flags -O3 -g %S/Inputs/host-usm-oob.cpp -o %t.out
1413
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/Inputs/host-usm-oob.cpp

sycl/test-e2e/AddressSanitizer/aot/gpu.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: linux, ocloc, gpu && level_zero
2-
// REQUIRES: build-and-run-mode
32

43
// RUN: %{build} %device_asan_aot_flags -O0 -g %S/Inputs/host-usm-oob.cpp -o %t.out
54
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/Inputs/host-usm-oob.cpp

sycl/test-e2e/AddressSanitizer/out-of-bounds/DeviceGlobal/device_global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// a choice based on that. This is rather fragile but workarounds the issue for
1616
// the time being.
1717

18-
// DEFINE: %{not} = not %if test-mode-run-only %{ --crash %}
18+
// DEFINE: %{not} = not %if run-mode && !build-mode %{ --crash %}
1919

2020
// RUN: %{build} %device_asan_flags -O0 -g -o %t1.out
2121
// RUN: %{run} %{not} %t1.out 2>&1 | FileCheck %s

sycl/test-e2e/BFloat16/bfloat16_example_aot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
///
55

66
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-cpu
7-
// REQUIRES: build-and-run-mode
87

98
// RUN: %clangxx -fsycl -fsycl-targets=spir64 %s -o %t.out
109
// RUN: %{run} %t.out
1110

1211
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
1312
// RUN: %{run} %t.out
1413

15-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
14+
// CPU AOT targets host isa, so we compile on the run system instead.
15+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
1616
// RUN: %{run} %t.out
1717

1818
#include "bfloat16_example.hpp"

sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
///
55

66
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-cpu
7-
// REQUIRES: build-and-run-mode
87

98
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
109
// RUN: %if cpu %{ %{run} %t.out %}
1110

12-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
11+
// CPU AOT targets host isa, so we compile on the run system instead.
12+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
1313
// RUN: %if cpu %{ %{run} %t.out %}
1414

1515
#include "bfloat16_example.hpp"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// End-to-End test for testing device image compression in AOT.
22
// REQUIRES: zstd, opencl-aot, cpu
3-
// REQUIRES: build-and-run-mode
43

5-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %O0 --offload-compress --offload-compression-level=3 %S/Inputs/single_kernel.cpp -o %t_compress.out
4+
// CPU AOT targets host isa, so we compile on the run system instead.
5+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %O0 --offload-compress --offload-compression-level=3 %S/Inputs/single_kernel.cpp -o %t_compress.out
66
// RUN: %{run} %t_compress.out

sycl/test-e2e/Compression/compression_separate_compile.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
// seperatly compile and link device images.
33

44
// REQUIRES: zstd, opencl-aot, cpu, linux
5-
// REQUIRES: build-and-run-mode
65

6+
// CPU AOT targets host isa, so we compile everything on the run system instead.
77
////////////////////// Compile device images
8-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL1' -DENABLE_KERNEL1 -c %s -o %t_kernel1_aot.o
9-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL2' -DENABLE_KERNEL2 -c %s -o %t_kernel2_aot.o
8+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL1' -DENABLE_KERNEL1 -c %s -o %t_kernel1_aot.o
9+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL2' -DENABLE_KERNEL2 -c %s -o %t_kernel2_aot.o
1010

1111
////////////////////// Link device images
12-
// RUN: %clangxx --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -v
12+
// RUN: %{run-aux} %clangxx --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -v
1313

1414
// Make sure the clang-offload-wrapper is called with the --offload-compress
1515
// option.
16-
// RUN: %clangxx --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -### &> %t_driver_opts.txt
17-
// RUN: FileCheck -input-file=%t_driver_opts.txt %s --check-prefix=CHECK-DRIVER-OPTS
16+
// RUN: %{run-aux} %clangxx --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -### &> %t_driver_opts.txt
17+
// RUN: %{run-aux} FileCheck -input-file=%t_driver_opts.txt %s --check-prefix=CHECK-DRIVER-OPTS
1818

1919
// CHECK-DRIVER-OPTS: clang-offload-wrapper{{.*}} "-offload-compress"
2020

2121
////////////////////// Compile the host program
22-
// RUN: %clangxx -fsycl -std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -c %s -o %t_main.o
22+
// RUN: %{run-aux} %clangxx -fsycl -std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -c %s -o %t_main.o
2323

2424
////////////////////// Link the host program and compressed device images
25-
// RUN: %clangxx -fsycl %t_main.o %t_kernel1_aot.o %t_kernel2_aot.o %t_compressed_image.o -o %t_compress.out
25+
// RUN: %{run-aux} %clangxx -fsycl %t_main.o %t_kernel1_aot.o %t_kernel2_aot.o %t_compressed_image.o -o %t_compress.out
2626

2727
// RUN: %{run} %t_compress.out
2828

sycl/test-e2e/DeviceArchitecture/device_architecture_on_device_aot.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// REQUIRES: opencl-aot, cpu
2-
// REQUIRES: build-and-run-mode
3-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %s -o %t.out
2+
3+
// CPU AOT targets host isa, so we compile on the run system instead.
4+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %s -o %t.out
45
// RUN: %{run} %t.out
56

67
#include <sycl/detail/core.hpp>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: opencl-aot, cpu
2-
// REQUIRES: build-and-run-mode
32

4-
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_x86_64 -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp \
5-
// RUN: -fsycl-dead-args-optimization
3+
// CPU AOT targets host isa, so we compile on the run system instead.
4+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_x86_64 -I %S/Inputs -o %t.out \
5+
// RUN: %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp -fsycl-dead-args-optimization
66
// RUN: %{run} %t.out
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: opencl-aot, cpu, linux
2-
// REQUIRES: build-and-run-mode
32

4-
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=spir64_x86_64 %S/assert.cpp -o %t.aot.out
3+
// CPU AOT targets host isa, so we compile on the run system instead.
4+
// RUN: %{run-aux} %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=spir64_x86_64 %S/assert.cpp -o %t.aot.out
55
// RUN: env EXPECTED_SIGNAL=SIGABRT SHOULD_CRASH=1 %{run} %t.aot.out 2>&1 | FileCheck %S/assert.cpp --check-prefixes=CHECK-MESSAGE

sycl/test-e2e/DeviceLib/cmath-aot.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// REQUIRES: opencl-aot, cpu
2-
// REQUIRES: build-and-run-mode
32
// UNSUPPORTED: windows
43

54
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
65

7-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/cmath_test.cpp -o %t.cmath.out
6+
// CPU AOT targets host isa, so we compile on the run system instead.
7+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/cmath_test.cpp -o %t.cmath.out
88
// RUN: %{run} %t.cmath.out
99

10-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/cmath_fp64_test.cpp -o %t.cmath.fp64.out
10+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/cmath_fp64_test.cpp -o %t.cmath.fp64.out
1111
// RUN: %{run} %t.cmath.fp64.out
1212

13-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/std_complex_math_test.cpp -o %t.complex.out
13+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/std_complex_math_test.cpp -o %t.complex.out
1414
// RUN: %{run} %t.complex.out
1515

16-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/std_complex_math_fp64_test.cpp -o %t.complex.fp64.out
16+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %{mathflags} %S/std_complex_math_fp64_test.cpp -o %t.complex.fp64.out
1717
// RUN: %{run} %t.complex.fp64.out

sycl/test-e2e/E2EExpr.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
class E2EExpr(BooleanExpression):
55
build_specific_features = {
6-
"build-and-run-mode",
76
"preview-mode",
87
"target-spir",
98
"target-nvidia",

sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,67 @@
22
// cannot do that reliably when number of devices is unknown.
33
//
44
// REQUIRES: level_zero, ocloc
5-
// REQUIRES: build-and-run-mode
65
//
76
// DEFINE: %{cache_vars} = env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_TRACE=1 SYCL_CACHE_DIR=%t/cache_dir
87
// DEFINE: %{build_cmd} = %{build}
9-
// RUN: mkdir -p %t/cache_dir
8+
// RUN: %{run-aux} mkdir -p %t/cache_dir
109
//
1110
// The following block of code should be copy-pasted as-is to verify different
1211
// JIT/AOT options. Don't know how to avoid code duplication.
1312
// ******************************
1413
// Check the logs first.
15-
// RUN: %{build_cmd} -DVALUE=1 -o %t.out
16-
// RUN: rm -rf %t/cache_dir/*
14+
// RUN: %{run-aux} %{build_cmd} -DVALUE=1 -o %t.out
15+
// RUN: %{run-aux} rm -rf %t/cache_dir/*
1716
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-WRITE
1817
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-READ
1918
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-READ
2019
//
2120
// Now try to substitute the cached image and verify it is actually taken and
2221
// the code/binary there is executed.
23-
// RUN: mv %t/cache_dir/*/*/*/*/*.bin %t.value1.bin
24-
// RUN: rm -rf %t/cache_dir/*
25-
// RUN: %{build_cmd} -DVALUE=2 -o %t.out
22+
// RUN: %{run-aux} mv %t/cache_dir/*/*/*/*/*.bin %t.value1.bin
23+
// RUN: %{run-aux} rm -rf %t/cache_dir/*
24+
// RUN: %{run-aux} %{build_cmd} -DVALUE=2 -o %t.out
2625
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes RESULT2
27-
// RUN: mv %t.value1.bin %t/cache_dir/*/*/*/*/*.bin
26+
// RUN: %{run-aux} mv %t.value1.bin %t/cache_dir/*/*/*/*/*.bin
2827
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes RESULT1
2928
// ******************************
3029
//
3130
// REDEFINE: %{build_cmd} = %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device acm-g10" %s
3231
// ******************************
3332
// Check the logs first.
34-
// RUN: %{build_cmd} -DVALUE=1 -o %t.out
35-
// RUN: rm -rf %t/cache_dir/*
33+
// RUN: %{run-aux} %{build_cmd} -DVALUE=1 -o %t.out
34+
// RUN: %{run-aux} rm -rf %t/cache_dir/*
3635
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-WRITE
3736
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-READ
3837
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-READ
3938

4039
//
4140
// Now try to substitute the cached image and verify it is actually taken and
4241
// the code/binary there is executed.
43-
// RUN: mv %t/cache_dir/*/*/*/*/*.bin %t.value1.bin
44-
// RUN: rm -rf %t/cache_dir/*
45-
// RUN: %{build_cmd} -DVALUE=2 -o %t.out
42+
// RUN: %{run-aux} mv %t/cache_dir/*/*/*/*/*.bin %t.value1.bin
43+
// RUN: %{run-aux} rm -rf %t/cache_dir/*
44+
// RUN: %{run-aux} %{build_cmd} -DVALUE=2 -o %t.out
4645
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes RESULT2
47-
// RUN: mv %t.value1.bin %t/cache_dir/*/*/*/*/*.bin
46+
// RUN: %{run-aux} mv %t.value1.bin %t/cache_dir/*/*/*/*/*.bin
4847
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes RESULT1
4948
// ******************************
5049
//
5150
// REDEFINE: %{build_cmd} = %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device acm-g10,acm-g11" %s
5251
// ******************************
5352
// Check the logs first.
54-
// RUN: %{build_cmd} -DVALUE=1 -o %t.out
55-
// RUN: rm -rf %t/cache_dir/*
53+
// RUN: %{run-aux} %{build_cmd} -DVALUE=1 -o %t.out
54+
// RUN: %{run-aux} rm -rf %t/cache_dir/*
5655
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-WRITE
5756
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-READ
5857
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-CACHE-READ
5958
//
6059
// Now try to substitute the cached image and verify it is actually taken and
6160
// the code/binary there is executed.
62-
// RUN: mv %t/cache_dir/*/*/*/*/*.bin %t.value1.bin
63-
// RUN: rm -rf %t/cache_dir/*
64-
// RUN: %{build_cmd} -DVALUE=2 -o %t.out
61+
// RUN: %{run-aux} mv %t/cache_dir/*/*/*/*/*.bin %t.value1.bin
62+
// RUN: %{run-aux} rm -rf %t/cache_dir/*
63+
// RUN: %{run-aux} %{build_cmd} -DVALUE=2 -o %t.out
6564
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes RESULT2
66-
// RUN: mv %t.value1.bin %t/cache_dir/*/*/*/*/*.bin
65+
// RUN: %{run-aux} mv %t.value1.bin %t/cache_dir/*/*/*/*/*.bin
6766
// RUN: %{cache_vars} %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --check-prefixes RESULT1
6867
// ******************************
6968

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// REQUIRES: opencl-aot, cpu
2-
// REQUIRES: build-and-run-mode
32

3+
// CPU AOT targets host isa, so we compile on the run system instead.
44
// Test with `--offload-new-driver`
5-
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_x86_64 -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp \
5+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_x86_64 -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp \
66
// RUN: -fsycl-dead-args-optimization --offload-new-driver
77
// RUN: %{run} %t.out
88

99
// Test -O0 with `--offload-new-driver`
10-
// RUN: %clangxx %O0 -fsycl -fsycl-targets=spir64-x86_64 %S/Inputs/aot.cpp
10+
// RUN: %{run-aux} %clangxx %O0 -fsycl -fsycl-targets=spir64-x86_64 %S/Inputs/aot.cpp
1111
// RUN: %{run} %t.out

sycl/test-e2e/NewOffloadDriver/cpu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
//===---------------------------------------------------------------------===//
88

99
// REQUIRES: opencl-aot, cpu
10-
// REQUIRES: build-and-run-mode
1110

11+
// CPU AOT targets host isa, so we compile on the run system instead.
1212
// Test with `--offload-new-driver`
13-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 --offload-new-driver %S/Inputs/aot.cpp -o %t.out
13+
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 --offload-new-driver %S/Inputs/aot.cpp -o %t.out
1414
// RUN: %{run} %t.out
1515

1616
// Test that opencl-aot can handle multiple build options.

sycl/test-e2e/NonUniformGroups/ballot_group.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
4+
// CPU AOT targets host isa, so we compile on the run system instead.
5+
// RUN: %if any-device-is-cpu && opencl-aot %{ %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
56
// RUN: %if cpu %{ %{run} %t.x86.out %}
67
//
7-
// REQUIRES: build-and-run-mode
88
// REQUIRES: cpu || gpu
99
// UNSUPPORTED: hip
1010

sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
4+
// CPU AOT targets host isa, so we compile on the run system instead.
5+
// RUN: %if any-device-is-cpu && opencl-aot %{ %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
56
// RUN: %if cpu %{ %{run} %t.x86.out %}
67
//
7-
// REQUIRES: build-and-run-mode
88
// REQUIRES: cpu || gpu
99
// REQUIRES: sg-32
1010
// REQUIRES: aspect-ext_oneapi_ballot_group

0 commit comments

Comments
 (0)