Skip to content

Commit aeff1d0

Browse files
[SYCL][Test E2E] Use %{build}/%{run} in DiscardEvents tests (#9339)
1 parent d982075 commit aeff1d0

12 files changed

+36
-75
lines changed

sycl/test-e2e/DiscardEvents/discard_events_accessors.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
1+
// RUN: %{build} -o %t.out
22
//
3-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
4-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
8-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: env SYCL_PI_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
94
//
105
// The test checks that the last parameter is `nullptr` for
116
// piEnqueueKernelLaunch for USM kernel using local accessor, but

sycl/test-e2e/DiscardEvents/discard_events_check_images.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// UNSUPPORTED: hip
22
// REQUIRES: aspect-ext_intel_legacy_image
33
//
4-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
4+
// RUN: %{build} -o %t.out
55
//
6-
// RUN: %CPU_RUN_PLACEHOLDER %t.out image
7-
// RUN: %GPU_RUN_PLACEHOLDER %t.out image
8-
//
9-
// RUN: %CPU_RUN_PLACEHOLDER %t.out mixed
10-
// RUN: %GPU_RUN_PLACEHOLDER %t.out mixed
6+
// RUN: %{run} %t.out image
7+
// RUN: %{run} %t.out mixed
118
//
129
// Note that the tests use image functionality and if you have problems with
1310
// the tests, please check if they pass without the discard_events property, if

sycl/test-e2e/DiscardEvents/discard_events_host_task.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// and host_task() which should be used instead does not use the PI call
33
// piEnqueueNativeKernel
44
//
5-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5+
// REQUIRES: cpu
66
//
7-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out &> %t.txt
8-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7+
// RUN: %{build} -o %t.out
8+
//
9+
// RUN: env SYCL_PI_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s
910
//
1011
// The test checks that the last parameter is `nullptr` for
1112
// piEnqueueNativeKernel.

sycl/test-e2e/DiscardEvents/discard_events_l0_inorder.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// REQUIRES: level_zero
22
//
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %{build} -o %t.out
44
//
5-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=0 ONEAPI_DEVICE_SELECTOR="level_zero:*" %GPU_RUN_PLACEHOLDER %t.out
6-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=1 ONEAPI_DEVICE_SELECTOR="level_zero:*" %GPU_RUN_PLACEHOLDER %t.out
7-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=2 ONEAPI_DEVICE_SELECTOR="level_zero:*" %GPU_RUN_PLACEHOLDER %t.out
8-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=3 ONEAPI_DEVICE_SELECTOR="level_zero:*" %GPU_RUN_PLACEHOLDER %t.out
5+
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=0 ONEAPI_DEVICE_SELECTOR="level_zero:*" %{run} %t.out
6+
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=1 ONEAPI_DEVICE_SELECTOR="level_zero:*" %{run} %t.out
7+
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=2 ONEAPI_DEVICE_SELECTOR="level_zero:*" %{run} %t.out
8+
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=3 ONEAPI_DEVICE_SELECTOR="level_zero:*" %{run} %t.out
99
//
1010
// The test is to check the execution of different queue operations has in-order
1111
// semantics regardless of batching.

sycl/test-e2e/DiscardEvents/discard_events_l0_leak.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: level_zero
22
//
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %{build} -o %t.out
44
//
5-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out wait 2>&1 %GPU_CHECK_PLACEHOLDER
6-
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' ZE_DEBUG=4 %GPU_RUN_PLACEHOLDER %t.out nowait 2>&1 %GPU_CHECK_PLACEHOLDER
5+
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' ZE_DEBUG=4 %{run} %t.out wait 2>&1 | FileCheck %s
6+
// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' ZE_DEBUG=4 %{run} %t.out nowait 2>&1 | FileCheck %s
77
//
88
// CHECK-NOT: LEAK
99
//

sycl/test-e2e/DiscardEvents/discard_events_mixed_calls.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
11
// UNSUPPORTED: hip
22
//
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %{build} -o %t.out
44
//
55
// The purpose of all tests is to make sure in-order semantics works correctly
66
// using discard_events and alternating event and eventless kernel calls in
77
// different ways.
88
//
99
// The test checks that eventless kernel calls work correctly after several
1010
// event kernel calls.
11-
// RUN: %CPU_RUN_PLACEHOLDER %t.out accessor-usm
12-
// RUN: %GPU_RUN_PLACEHOLDER %t.out accessor-usm
13-
// RUN: %ACC_RUN_PLACEHOLDER %t.out accessor-usm
11+
// RUN: %{run} %t.out accessor-usm
1412
//
1513
// The test checks that event kernel calls work correctly after several
1614
// eventless kernel calls.
17-
// RUN: %CPU_RUN_PLACEHOLDER %t.out usm-accessor
18-
// RUN: %GPU_RUN_PLACEHOLDER %t.out usm-accessor
19-
// RUN: %ACC_RUN_PLACEHOLDER %t.out usm-accessor
15+
// RUN: %{run} %t.out usm-accessor
2016
//
2117
// The test checks that alternating event and eventless kernel calls work
2218
// correctly.
23-
// RUN: %CPU_RUN_PLACEHOLDER %t.out mixed
24-
// RUN: %GPU_RUN_PLACEHOLDER %t.out mixed
25-
// RUN: %ACC_RUN_PLACEHOLDER %t.out mixed
19+
// RUN: %{run} %t.out mixed
2620
//
2721
// The test checks that piEnqueueMemBufferMap and piEnqueueMemUnmap work
2822
// correctly when we alternate between event and eventless kernel calls.
29-
// RUN: %CPU_RUN_PLACEHOLDER %t.out map-unmap
30-
// RUN: %GPU_RUN_PLACEHOLDER %t.out map-unmap
31-
// RUN: %ACC_RUN_PLACEHOLDER %t.out map-unmap
23+
// RUN: %{run} %t.out map-unmap
3224
//
3325
// Note that the tests use buffer functionality and if you have problems with
3426
// the tests, please check if they pass without the discard_events property, if

sycl/test-e2e/DiscardEvents/discard_events_using_assert.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
// UNSUPPORTED: cuda || hip
33
//
44
// UNSUPPORTED: ze_debug-1,ze_debug4
5-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5+
// RUN: %{build} -o %t.out
66
//
7-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out &> %t.txt
8-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt
10-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
11-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
12-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7+
// RUN: env SYCL_PI_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
138
//
149
// The test checks that the last parameter is not `nullptr` for
1510
// piEnqueueKernelLaunch.

sycl/test-e2e/DiscardEvents/discard_events_using_assert_ndebug.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DNDEBUG -o %t.out
1+
// RUN: %{build} -DNDEBUG -o %t.out
22
//
3-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out &> %t.txt
4-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt
6-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
8-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: env SYCL_PI_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
94
//
105
// The test checks that the last parameter is `nullptr` for
116
// piEnqueueKernelLaunch.

sycl/test-e2e/DiscardEvents/discard_events_usm.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// FIXME unsupported in HIP plugin
22
// UNSUPPORTED: hip
33
//
4-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5-
//
6-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out &> %t.txt
7-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
8-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt
9-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
10-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
11-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
4+
// RUN: %{build} -o %t.out
5+
//
6+
// RUN: env SYCL_PI_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
127
//
138
// The test checks that the last parameter is `nullptr` for all PI calls that
149
// should discard events.

sycl/test-e2e/DiscardEvents/discard_events_usm_ooo_queue.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
// FIXME: fails on HIP plugin
22
// UNSUPPORTED: hip
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
4-
//
5-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out &> %t.txt
6-
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt
8-
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
9-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out &> %t.txt
10-
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
3+
// RUN: %{build} -o %t.out
4+
//
5+
// RUN: env SYCL_PI_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
116
//
127
// The test checks that the last parameter is not `nullptr` for all PI calls
138
// that should discard events.

sycl/test-e2e/DiscardEvents/invalid_event.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// FIXME: Fails on HIP and OpenCL accelerator
22
// UNSUPPORTED: hip, (opencl && accelerator)
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %{build} -o %t.out
44
//
5-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
5+
// RUN: %{run} %t.out
86
//
97
// The test checks that each PI call to the queue returns a discarded event
108
// with the status "ext_oneapi_unknown"

sycl/test-e2e/DiscardEvents/invalid_event_exceptions.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
1+
// RUN: %{build} -o %t.out
22
//
3-
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// RUN: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %{run} %t.out
64
//
75
// The test checks 3 things:
86
// 1. An attempt to construct a queue with both properties(discard_events and

0 commit comments

Comments
 (0)