Skip to content

Commit 8064200

Browse files
committed
[SYCL][CUDA] Run more LIT tests with CUDA
Make the backend used explicit in more LIT tests. These tests failed on machines with only NVIDIA OpenCL available as it is not supported. Signed-off-by: Bjoern Knafla <[email protected]>
1 parent 5e05e2e commit 8064200

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

sycl/test/basic_tests/diagnostics/device-check.cpp

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
2-
// RUN: env SYCL_DEVICE_TYPE=cpu %t.out
3-
// RUN: env SYCL_DEVICE_TYPE=gpu %t.out
4-
// RUN: env SYCL_DEVICE_TYPE=acc %t.out
5-
// RUN: env SYCL_DEVICE_TYPE=host %t.out
6-
// RUN: env SYCL_DEVICE_TYPE=CPU %t.out
7-
// RUN: env SYCL_DEVICE_TYPE=GPU %t.out
8-
// RUN: env SYCL_DEVICE_TYPE=ACC %t.out
9-
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
10-
// RUN: env SYCL_DEVICE_TYPE=Cpu %t.out
11-
// RUN: env SYCL_DEVICE_TYPE=Gpu %t.out
12-
// RUN: env SYCL_DEVICE_TYPE=Acc %t.out
13-
// RUN: env SYCL_DEVICE_TYPE=Host %t.out
14-
// RUN: env SYCL_DEVICE_TYPE=XPU %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=cpu %t.out
3+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=gpu %t.out
4+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=acc %t.out
5+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=host %t.out
6+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=CPU %t.out
7+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=GPU %t.out
8+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=ACC %t.out
9+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=HOST %t.out
10+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=Cpu %t.out
11+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=Gpu %t.out
12+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=Acc %t.out
13+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=Host %t.out
14+
// RUN: env SYCL_BE=%sycl_be SYCL_DEVICE_TYPE=XPU %t.out
1515

1616
//==------------------- device-check.cpp --------------------------==//
1717
// This is a diagnostic test which ensures that

sycl/test/basic_tests/diagnostics/handler.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
2-
// RUN: %t.out | FileCheck %s
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2+
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
4+
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
5+
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
36
//==------------------- handler.cpp ----------------------------------------==//
47
//
58
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/basic_tests/get_nonhost_devices.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
2-
// RUN: %t.out
3-
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2+
// RUN: env SYCL_BE=%sycl_be %t.out
3+
//
44
// Check that the host device is not included in devices returned by
55
// get_devices() if a non-host device type is specified.
66

sycl/test/basic_tests/queue.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
3-
// RUN: %t.out
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
46
//==--------------- queue.cpp - SYCL queue test ----------------------------==//
57
//
68
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/lit.cfg.py

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474

7575
backend=lit_config.params.get('SYCL_BE', "PI_OPENCL")
7676
lit_config.note("Backend: {BACKEND}".format(BACKEND=backend))
77+
config.substitutions.append( ('%sycl_be', backend) )
7778

7879
get_device_count_by_type_path = os.path.join(config.llvm_tools_dir, "get_device_count_by_type")
7980

0 commit comments

Comments
 (0)