Skip to content

Commit abc6a59

Browse files
committed
[SYCL] Fix requirements for aot tests
Currently tests for aot require only existence of the tools for aot in the PATH. But this is not enough, for successful aot compilation corresponding platform must be available. Signed-off-by: Artur Gainullin <[email protected]>
1 parent 284d7d2 commit abc6a59

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

sycl/test/aot/accelerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: aoc
1+
// REQUIRES: aoc, accelerator
22

33
// RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice %s -o %t.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out

sycl/test/aot/cpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: opencl-aot
1+
// REQUIRES: opencl-aot, cpu
22

33
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice %s -o %t.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out

sycl/test/aot/gpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: ocloc
1+
// REQUIRES: ocloc, gpu
22

33
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice "-device skl" %s -o %t.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out

sycl/test/aot/multiple-devices.cpp

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

9-
// REQUIRES: opencl-aot, ocloc, aoc
9+
// REQUIRES: opencl-aot, ocloc, aoc, cpu, gpu, accelerator
1010

1111
// 1-command compilation case
1212
// Targeting CPU, GPU, FPGA
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: aoc
1+
// REQUIRES: aoc, accelerator
22

33
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: ocloc
1+
// REQUIRES: ocloc, gpu
22

33
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice "-device skl" -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

sycl/test/lit.cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def getDeviceCount(device_type):
150150
print("Found available accelerator device")
151151
acc_run_substitute = " env SYCL_DEVICE_TYPE=ACC "
152152
acc_check_substitute = "| FileCheck %s"
153+
config.available_features.add('accelerator')
153154
config.substitutions.append( ('%ACC_RUN_PLACEHOLDER', acc_run_substitute) )
154155
config.substitutions.append( ('%ACC_CHECK_PLACEHOLDER', acc_check_substitute) )
155156

0 commit comments

Comments
 (0)