Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit ce23b34

Browse files
authored
[SYCL] Remove use of deprecated environment variables (#72)
Use of SYCL_BE and SYCL_DEVICE_TYPE was removed from LIT framework. SYCL_DEVICE_FILTER is used instead: - update [CPU|GPU|ACC]_RUN_PLACEHOLDER to use SYCL_DEVICE_FILTER; - change values format used to define a backend and a device type to match SYCL_DEVICE_FILTER requirements; - add BE_RUN_PLACEHOLDER to set backend only for tests which require that; - add mapping from old SYCL backend name format to new one to avoid impact on CI automation.
1 parent e2f949c commit ce23b34

19 files changed

+83
-79
lines changed

SYCL/Basic/context-with-multiple-devices.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
// REQUIRES: cpu, accelerator, aoc
1+
// REQUIRES: accelerator, aoc
22

3-
// UNSUPPORTED: cuda, level_zero
4-
5-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %s -o %t1.out
6-
// RUN: %CPU_RUN_PLACEHOLDER CL_CONFIG_CPU_EMULATE_DEVICES=2 %t1.out
7-
// RUN: %CPU_RUN_PLACEHOLDER CL_CONFIG_CPU_EMULATE_DEVICES=4 %t1.out
83
// RUN: %clangxx -fsycl -fintelfpga -fsycl-unnamed-lambda %s -o %t2.out
9-
// RUN: %ACC_RUN_PLACEHOLDER CL_CONFIG_CPU_EMULATE_DEVICES=2 %t2.out
4+
// RUN: env CL_CONFIG_CPU_EMULATE_DEVICES=2 %t2.out
105

116
#include <CL/sycl.hpp>
127

@@ -22,7 +17,8 @@ void exceptionHandler(sycl::exception_list exceptions) {
2217
}
2318

2419
int main() {
25-
auto DeviceList = sycl::device::get_devices();
20+
auto DeviceList =
21+
sycl::device::get_devices(sycl::info::device_type::accelerator);
2622

2723
// remove host device from the list
2824
DeviceList.erase(std::remove_if(DeviceList.begin(), DeviceList.end(),

SYCL/Basic/device_code_dae.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// RUN: clang-offload-wrapper -o wrapper.bc -host=x86_64 -kind=sycl -target=spir64 -batch table.txt
1212
// RUN: %clangxx -c wrapper.bc -o wrapper.o
1313
// RUN: %clangxx wrapper.o host_code.o -o app.exe -lsycl
14-
// RUN: env SYCL_BE=%sycl_be ./app.exe
14+
// RUN: %BE_RUN_PLACEHOLDER ./app.exe
1515

1616
//==---------device_code_dae.cpp - dead argument elimination test ----------==//
1717
//

SYCL/Basic/fpga_tests/fpga_aocx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
// AOCX with object
2222
// RUN: %clangxx -fsycl -fintelfpga %t.o %t_image.a -o %t_aocx_obj.out
2323
//
24-
// RUN: env SYCL_DEVICE_TYPE=ACC %t_aocx_src.out
25-
// RUN: env SYCL_DEVICE_TYPE=ACC %t_aocx_obj.out
24+
// RUN: %ACC_RUN_PLACEHOLDER %t_aocx_src.out
25+
// RUN: %ACC_RUN_PLACEHOLDER %t_aocx_obj.out

SYCL/Basic/fpga_tests/fpga_aocx_win.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
// AOCX with object
2323
// RUN: %clangxx -fsycl -fintelfpga %t.obj %t_image.lib -o %t_aocx_obj.out
2424
//
25-
// RUN: env SYCL_DEVICE_TYPE=ACC %t_aocx_src.out
26-
// RUN: env SYCL_DEVICE_TYPE=ACC %t_aocx_obj.out
25+
// RUN: %ACC_RUN_PLACEHOLDER %t_aocx_src.out
26+
// RUN: %ACC_RUN_PLACEHOLDER %t_aocx_obj.out

SYCL/Basic/queue/queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_BE=%sycl_be %t.out
2+
// RUN: %BE_RUN_PLACEHOLDER %t.out
33
//==--------------- queue.cpp - SYCL queue test ----------------------------==//
44
//
55
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

SYCL/Config/kernel_from_file.cpp

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

44
// RUN: %clangxx -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
55
// RUN: %clangxx -include %t.h %s -o %t.out -lsycl -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
6-
// RUN: env SYCL_BE=%sycl_be SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
6+
// RUN: %BE_RUN_PLACEHOLDER env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
77
// CHECK: Passed
88

99
#include <CL/sycl.hpp>

SYCL/DeviceLib/assert-windows.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
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 SYCL_DEVICE_TYPE=CPU %t.out >%t.stdout.pi.fallback
17-
// RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU %t.out >%t.stdout.msg.fallback
16+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %t.out >%t.stdout.pi.fallback
17+
// RUN: %CPU_RUN_PLACEHOLDER env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %t.out >%t.stdout.msg.fallback
1818
//
1919
// RUN: FileCheck %s --check-prefix=CHECK-MESSAGE --input-file %t.stdout.msg.fallback
2020
// CHECK-MESSAGE: {{.*}}assert-windows.cpp:{{[0-9]+}}: (null): global id:

SYCL/DeviceLib/assert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
//
7272
// Overall this sounds stable enough. What could possibly go wrong?
7373
//
74-
// RUN: env SYCL_PI_TRACE=2 SHOULD_CRASH=1 SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGABRT SKIP_IF_NO_EXT=1 %t.out 2>%t.stderr.native >%t.stdout.native
74+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGABRT SKIP_IF_NO_EXT=1 %t.out 2>%t.stderr.native >%t.stdout.native
7575
// RUN: FileCheck %s --input-file %t.stdout.native --check-prefixes=CHECK-NATIVE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED
7676
// RUN: FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED
7777
//

SYCL/ESIMD/esimd_test_utils.hpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <fstream>
1616
#include <iostream>
1717
#include <iterator>
18+
#include <string>
1819
#include <vector>
1920

2021
using namespace cl::sycl;
@@ -30,19 +31,21 @@ namespace esimd_test {
3031
// was returned for all devices, then the selection process will cause an
3132
// exception.
3233
class ESIMDSelector : public device_selector {
33-
// Require GPU device unless HOST is requested in SYCL_DEVICE_TYPE env
34+
// Require GPU device unless HOST is requested in SYCL_DEVICE_FILTER env
3435
virtual int operator()(const device &device) const {
35-
if (const char *dev_type = getenv("SYCL_DEVICE_TYPE")) {
36-
if (!strcmp(dev_type, "GPU"))
36+
if (const char *dev_filter = getenv("SYCL_DEVICE_FILTER")) {
37+
std::string filter_string(dev_filter);
38+
if (filter_string.find("gpu") != std::string::npos)
3739
return device.is_gpu() ? 1000 : -1;
38-
if (!strcmp(dev_type, "HOST"))
40+
if (filter_string.find("host") != std::string::npos)
3941
return device.is_host() ? 1000 : -1;
40-
std::cerr << "Supported 'SYCL_DEVICE_TYPE' env var values are 'GPU' and "
41-
"'HOST', '"
42-
<< dev_type << "' is not.\n";
42+
std::cerr
43+
<< "Supported 'SYCL_DEVICE_FILTER' env var values are 'gpu' and "
44+
"'host', '"
45+
<< filter_string << "' does not contain such substrings.\n";
4346
return -1;
4447
}
45-
// If "SYCL_DEVICE_TYPE" not defined, only allow gpu device
48+
// If "SYCL_DEVICE_FILTER" not defined, only allow gpu device
4649
return device.is_gpu() ? 1000 : -1;
4750
}
4851
};

SYCL/External/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd build
2222
cmake -G Ninja \
2323
-DTEST_SUITE_SUBDIRS=SYCL \
2424
-DTEST_SUITE_LIT=<PATH_TO_llvm-lit> \
25-
-DCHECK_SYCL_ALL="PI_OPENCL:cpu,acc,gpu,host;PI_LEVEL_ZERO:gpu,host" \
25+
-DCHECK_SYCL_ALL="opencl:cpu,acc,gpu,host;level_zero:gpu,host" \
2626
-DCMAKE_CXX_COMPILER=<PATH_TO_sycl_compiler> \
2727
-DSYCL_EXTERNAL_TESTS="RSBench" \
2828
..
@@ -37,7 +37,7 @@ llvm-lit . --show-tests
3737
# Run specific test (e.g. RSBench only)
3838
llvm-lit SYCL/External/RSBench
3939
# Run tests with parameters
40-
llvm-lit --param target_devices=host,gpu --param sycl_be=PI_LEVEL_ZERO \
40+
llvm-lit --param target_devices=host,gpu --param sycl_be=level_zero \
4141
--param dpcpp_compiler=path/to/clang++ --param dump_ir=True SYCL/External/RSBench
4242
```
4343

SYCL/Plugin/interop-opencl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: opencl
22

33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out
4-
// RUN: env SYCL_BE=PI_OPENCL %CPU_RUN_PLACEHOLDER %t.out
5-
// RUN: env SYCL_BE=PI_OPENCL %GPU_RUN_PLACEHOLDER %t.out
6-
// RUN: env SYCL_BE=PI_OPENCL %ACC_RUN_PLACEHOLDER %t.out
4+
// RUN: env SYCL_DEVICE_FILTER=opencl %CPU_RUN_PLACEHOLDER %t.out
5+
// RUN: env SYCL_DEVICE_FILTER=opencl %GPU_RUN_PLACEHOLDER %t.out
6+
// RUN: env SYCL_DEVICE_FILTER=opencl %ACC_RUN_PLACEHOLDER %t.out
77

88
//==-- interop-opencl.cpp - SYCL test for OpenCL interop API --------------===//
99
//

SYCL/Plugin/sycl-ls-gpu-cuda.cpp

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

3-
// RUN: env SYCL_BE=PI_CUDA sycl-ls --verbose >%t.cuda.out
3+
// RUN: env SYCL_DEVICE_FILTER=cuda sycl-ls --verbose >%t.cuda.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out
55

66
// CHECK-BUILTIN-GPU-CUDA: gpu_selector(){{.*}}GPU :{{.*}}CUDA

SYCL/Plugin/sycl-ls-gpu-default.cpp

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

3-
// RUN: env --unset=SYCL_BE sycl-ls --verbose >%t.default.out
3+
// RUN: env --unset=SYCL_DEVICE_FILTER sycl-ls --verbose >%t.default.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out
55

66
// CHECK-GPU-BUILTIN: gpu_selector(){{.*}}GPU : {{.*}}Level-Zero

SYCL/Plugin/sycl-ls-gpu-opencl.cpp

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

3-
// RUN: env SYCL_BE=PI_OPENCL sycl-ls --verbose >%t.opencl.out
3+
// RUN: env SYCL_DEVICE_FILTER=opencl sycl-ls --verbose >%t.opencl.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.opencl.out
55

66
// CHECK-GPU-BUILTIN: gpu_selector(){{.*}}GPU : {{.*}}OpenCL

SYCL/Plugin/sycl-ls-gpu-sycl-be.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
// RUN: sycl-ls --verbose >%t.default.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.default.out
55

6-
// RUN: env SYCL_BE=PI_OPENCL sycl-ls --verbose >%t.opencl.out
6+
// RUN: env SYCL_DEVICE_FILTER=opencl sycl-ls --verbose >%t.opencl.out
77
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.opencl.out
88

99
// CHECK-BUILTIN-GPU-OPENCL: gpu_selector(){{.*}}GPU : OpenCL
1010
// CHECK-CUSTOM-GPU-OPENCL: custom_selector(gpu){{.*}}GPU : OpenCL
1111

12-
// RUN: env SYCL_BE=PI_CUDA sycl-ls --verbose >%t.cuda.out
12+
// RUN: env SYCL_DEVICE_FILTER=cuda sycl-ls --verbose >%t.cuda.out
1313
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out
1414

1515
// CHECK-BUILTIN-GPU-CUDA: gpu_selector(){{.*}}GPU : CUDA

SYCL/Plugin/sycl-targets-order.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=spir64-unknown-unknown-sycldevice,nvptx64-unknown-unknown-sycldevice %s -o %t-spir64-nvptx64.out
2-
// RUN: env SYCL_BE=PI_OPENCL %t-spir64-nvptx64.out
3-
// RUN: env SYCL_BE=PI_CUDA %t-spir64-nvptx64.out
2+
// RUN: env SYCL_DEVICE_FILTER=opencl %t-spir64-nvptx64.out
3+
// RUN: env SYCL_DEVICE_FILTER=cuda %t-spir64-nvptx64.out
44
// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-unknown-unknown-sycldevice,spir64-unknown-unknown-sycldevice %s -o %t-nvptx64-spir64.out
5-
// RUN: env SYCL_BE=PI_OPENCL %t-nvptx64-spir64.out
6-
// RUN: env SYCL_BE=PI_CUDA %t-nvptx64-spir64.out
5+
// RUN: env SYCL_DEVICE_FILTER=opencl %t-nvptx64-spir64.out
6+
// RUN: env SYCL_DEVICE_FILTER=cuda %t-nvptx64-spir64.out
77

88
// REQUIRES: opencl, cuda
99

SYCL/README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cd build
2424
cmake -G Ninja \
2525
-DTEST_SUITE_SUBDIRS=SYCL \
2626
-DTEST_SUITE_LIT=<PATH_TO_llvm-lit> \
27-
-DCHECK_SYCL_ALL="PI_OPENCL:cpu,acc,gpu,host;PI_OPENCL:cpu;PI_OPENCL:gpu;PI_OPENCL:acc;PI_OPENCL:host;PI_LEVEL_ZERO:gpu,host;PI_LEVEL_ZERO:gpu;PI_LEVEL_ZERO:host" \
27+
-DCHECK_SYCL_ALL="opencl:cpu,acc,gpu,host;opencl:cpu;opencl:gpu;opencl:acc;opencl:host;opencl:gpu,host;level_zero:gpu;level_zero:host" \
2828
-DSYCL_EXTERNAL_TESTS="RSBench" \
2929
..
3030
# Build and run full list of tests for all supported combinations of target
@@ -35,7 +35,7 @@ llvm-lit . --show-tests
3535
# Run specific test
3636
llvm-lit <path_to_test>
3737
# Run tests with parameters
38-
llvm-lit --param target_devices=host,gpu --param sycl_be=PI_LEVEL_ZERO \
38+
llvm-lit --param target_devices=host,gpu --param sycl_be=level_zero \
3939
--param dpcpp_compiler=path/to/clang++ --param dump_ir=True .
4040
```
4141

@@ -62,22 +62,24 @@ value is cpu,gpu,acc,host). Supported target_devices values are:
6262
- **acc** - FPGA emulator device available in OpenCL backend only;
6363
- **host** - SYCL Host device availabel with all backends.
6464

65-
***SYCL_BE*** defined SYCL backend to be used for testing (default is
66-
PI_OPENCL).
67-
Supported sycl_be values:
68-
- PI_OPENCL - for OpenCL backend;
69-
- PI_CUDA - for CUDA backend;
70-
- PI_LEVEL_ZERO - Level Zero backend.
65+
***SYCL_BE*** defined SYCL backend to be used for testing.
66+
Supported sycl_be values are:
67+
- opencl - for OpenCL backend;
68+
- cuda - for CUDA backend;
69+
- level_zero - Level Zero backend.
7170

7271
***CHECK_SYCL_ALL*** allows selection of multiple SYCL backends with set of
7372
target devices per each to be tested iteratively. Value may contain semicolon-
7473
separated list of configurations. Each configuration includes backend separated
7574
from comma-separated list of target devices with colon (e.g.
76-
-DCHECK_SYCL_ALL="PI_OPENCL:cpu,host;PI_LEVEL_ZERO:gpu,host"). The testing is
75+
-DCHECK_SYCL_ALL="opencl:cpu,host;level_zero:gpu,host"). The testing is
7776
done using check-sycl-all target. It is recommended to pass -k0 parameter to
7877
build command line to avoid break execution on test failures for the first
7978
backend.
8079

80+
Note: for compatibility reasons old values for SYCL backend selections are
81+
supported temporarely (PI_OPENCL, PI_CUDA, PI_LEVEL_ZERO).
82+
8183
***SYCL_EXTERNAL_TESTS*** semicolon-separate names of external SYCL applications
8284
which are built and run as part of the testing. Name is equal to subdirectory in
8385
[External](External) containing driver for building and running the application
@@ -98,45 +100,45 @@ compilers, etc) are available in the system.
98100
See examples below for configuring tests targeting different devices:
99101
- Multiple backends iterative mode
100102
```
101-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DCHECK_SYCL_ALL="PI_OPENCL:acc,gpu,cpu,host;PI_LEVEL_ZERO:gpu,host;PI_CUDA:gpu,host" -C../cmake/caches/clang_fsycl.cmake ..
103+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DCHECK_SYCL_ALL="opencl:acc,gpu,cpu,host;level_zero:gpu,host;cuda:gpu,host" -C../cmake/caches/clang_fsycl.cmake ..
102104
ninja -k0 check-sycl-all
103105
```
104106
- SYCL host:
105107
```
106-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=PI_OPENCL -DSYCL_TARGET_DEVICES="host" -C../cmake/caches/clang_fsycl.cmake ..
108+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=opencl -DSYCL_TARGET_DEVICES="host" -C../cmake/caches/clang_fsycl.cmake ..
107109
ninja check
108110
```
109111
- OpenCL GPU
110112
```
111-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=PI_OPENCL -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
113+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=opencl -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
112114
ninja check
113115
```
114116
- OpenCL CPU
115117
```
116-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=PI_OPENCL -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
118+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=opencl -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
117119
ninja check
118120
```
119121
- OpenCL FPGA emulator
120122
```
121-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=PI_OPENCL -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
123+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=opencl -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
122124
ninja check
123125
```
124126
- CUDA GPU
125127
```
126-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=PI_CUDA -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl_cuda.cmake ..
128+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=cuda -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl_cuda.cmake ..
127129
ninja check
128130
```
129131
- Level Zero GPU
130132
```
131-
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=PI_LEVEL_ZERO -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
133+
cmake -G Ninja -DTEST_SUITE_COLLECT_CODE_SIZE=OFF -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF -DTEST_SUITE_SUBDIRS=SYCL -DTEST_SUITE_LIT=<PATH_TO_llvm-lit> -DSYCL_BE=level_zero -DSYCL_TARGET_DEVICES="gpu" -C../cmake/caches/clang_fsycl.cmake ..
132134
ninja check
133135
```
134136

135137
# LIT parameters accepted by LIT executor:
136138
* **dpcpp_compiler** - full path to dpcpp compiler;
137139
* **target_device** - comma-separated list of target devices (cpu, gpu, acc,
138140
host);
139-
* **sycl_be** - SYCL backend to be used (PI_OPENCL, PI_LEVEL_ZERO, PI_CUDA);
141+
* **sycl_be** - SYCL backend to be used (opencl, level_zero, cuda);
140142
* **dump_ir** - if IR dumping is supported for compiler (True, False);
141143
* **extra_environment** - comma-separated list of variables with values to be
142144
added to test environment. Can be also set by LIT_EXTRA_ENVIRONMENT variable

SYCL/SeparateCompile/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//
3838
// >> ---- link the full hetero app
3939
// RUN: %clangxx wrapper.o a.o b.o -o app.exe -lsycl
40-
// RUN: env SYCL_BE=%sycl_be ./app.exe | FileCheck %s
40+
// RUN: %BE_RUN_PLACEHOLDER ./app.exe | FileCheck %s
4141
// CHECK: pass
4242

4343
//==----------- test.cpp - Tests SYCL separate compilation -----------------==//

0 commit comments

Comments
 (0)