Skip to content

Commit eac774b

Browse files
[SYCL][Test E2E] Use %{build}/%{run} in DeviceLib tests (#9337)
1 parent 948b007 commit eac774b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+124
-196
lines changed

sycl/test-e2e/DeviceLib/ITTAnnotations/atomic.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// UNSUPPORTED: hip
22

3-
// RUN: %clangxx -fsycl -fsycl-instrument-device-code %s -o %t.out \
4-
// RUN: -fsycl-targets=%sycl_triple
5-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %{build} -fsycl-instrument-device-code -o %t.out
4+
// RUN: %{run} %t.out
85

96
#include "CL/sycl.hpp"
107

sycl/test-e2e/DeviceLib/ITTAnnotations/barrier.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// UNSUPPORTED: hip
22

3-
// RUN: %clangxx -fsycl -fsycl-instrument-device-code %s -o %t.out \
4-
// RUN: -fsycl-targets=%sycl_triple
5-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %{build} -fsycl-instrument-device-code -o %t.out
4+
// RUN: %{run} %t.out
85

96
#include "CL/sycl.hpp"
107
#include <vector>

sycl/test-e2e/DeviceLib/assert-windows.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Disable the test until the fix reaches SYCL test infrastructure.
55
// XFAIL: *
66
//
7-
// RUN: %clangxx -fsycl %s -o %t.out
7+
// RUN: %{build} -o %t.out
88
//
99
// MSVC implementation of assert does not call an unreachable built-in, so the
1010
// program doesn't terminate when fallback is used.
@@ -13,15 +13,13 @@
1313
// explicitly. Since the test is going to crash, we'll have to follow a similar
1414
// approach as on Linux - call the test in a subprocess.
1515
//
16-
// RUN: env SYCL_PI_TRACE=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %CPU_RUN_PLACEHOLDER %t.out >%t.stdout.pi.fallback
17-
// RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %CPU_RUN_PLACEHOLDER %t.out >%t.stdout.msg.fallback
16+
// RUN: env SYCL_PI_TRACE=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-FALLBACK
17+
// RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-MESSAGE
1818
//
19-
// RUN: FileCheck %s --check-prefix=CHECK-MESSAGE --input-file %t.stdout.msg.fallback
2019
// CHECK-MESSAGE: {{.*}}assert-windows.cpp:{{[0-9]+}}: (null): global id:
2120
// [{{[0-3]}},0,0], local id: [{{[0-3]}},0,0] Assertion `accessorC[wiID] == 0 &&
2221
// "Invalid value"` failed.
2322
//
24-
// RUN: FileCheck %s --input-file %t.stdout.pi.fallback --check-prefix=CHECK-FALLBACK
2523
// CHECK-FALLBACK: ---> piProgramLink
2624

2725
#include <array>

sycl/test-e2e/DeviceLib/assert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: (cpu || cuda ) && linux
2-
// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2+
// RUN: %{build} -DSYCL_FALLBACK_ASSERT=1 -o %t.out
33
// (see the other RUN lines below; it is a bit complicated)
44
//
55
// assert() call in device code guarantees nothing: on some devices it behaves

sycl/test-e2e/DeviceLib/built-ins/ext_native_math.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
3-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1+
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out
2+
// RUN: %{run} %t.out
53

64
// Tests oneapi extension native tanh math function for sycl::vec and
75
// sycl::marray float cases.

sycl/test-e2e/DeviceLib/built-ins/ext_native_math_fp16.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// REQUIRES: aspect-fp16
2-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t.out
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
2+
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out
3+
// RUN: %{run} %t.out
64

75
// OpenCL CPU driver does not support cl_khr_fp16 extension for this reason this
86
// test is compiled with the -fsycl-device-code-split flag

sycl/test-e2e/DeviceLib/built-ins/fast-math-flag.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// RUN: %clangxx -fsycl -ffast-math -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
3-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1+
// RUN: %{build} -ffast-math -o %t.out
2+
// RUN: %{run} %t.out
53

64
#include <cassert>
75
#include <sycl/sycl.hpp>

sycl/test-e2e/DeviceLib/built-ins/ftz-flag.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
22

3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xclang -fdenormal-fp-math-f32="preserve-sign,preserve-sign" %s -o %t.out %{mathflags}
4-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %{build} -Xclang -fdenormal-fp-math-f32="preserve-sign,preserve-sign" -o %t.out %{mathflags}
4+
// RUN: %{run} %t.out
75

86
#include <cassert>
97
#include <sycl/sycl.hpp>

sycl/test-e2e/DeviceLib/built-ins/marray_integer.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
3-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1+
// RUN: %{build} -o %t.out
2+
// RUN: %{run} %t.out
53

64
#include <CL/sycl.hpp>
75

sycl/test-e2e/DeviceLib/built-ins/nan.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
3-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1+
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t.out
2+
// RUN: %{run} %t.out
53

64
#include <iostream>
75
#include <sycl/sycl.hpp>

0 commit comments

Comments
 (0)