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

Commit 5ad0692

Browse files
authored
[SYCL] Add support for CL-style options (#157)
- Adopt tests to use CL-style options when clang-cl compiler is used; - Add possibility for setting Level Zero headers and loader location in LIT parameters or CMake variables; - Rename level_zero_header feature to level_zero_dev_kit to identify that both Level Zero headers and loader are available; - Search for Level Zero headers and loader in environment; - Inherit LIBRARY_PATH, CPATH, INCLUDE environment variables to LIT infrastructure.
1 parent 100eeae commit 5ad0692

33 files changed

+94
-68
lines changed

SYCL/Basic/accessor/device_accessor_deduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Daccessor_new_api_test -std=c++17 %S/Inputs/device_accessor.cpp -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Daccessor_new_api_test %S/Inputs/device_accessor.cpp -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Basic/accessor/get_device_access_deduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Dbuffer_new_api_test -std=c++17 %S/Inputs/device_accessor.cpp -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Dbuffer_new_api_test %S/Inputs/device_accessor.cpp -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Basic/accessor/get_host_access_deduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Dbuffer_new_api_test -std=c++17 %S/Inputs/host_accessor.cpp -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Dbuffer_new_api_test %S/Inputs/host_accessor.cpp -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Basic/accessor/get_host_task_access_deduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Dbuffer_new_api_test -std=c++17 %S/Inputs/host_task_accessor.cpp -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Dbuffer_new_api_test %S/Inputs/host_task_accessor.cpp -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Basic/accessor/host_accessor_deduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Daccessor_new_api_test -std=c++17 %S/Inputs/host_accessor.cpp -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Daccessor_new_api_test %S/Inputs/host_accessor.cpp -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Basic/accessor/host_task_accessor_deduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Daccessor_new_api_test -std=c++17 %S/Inputs/host_task_accessor.cpp -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Daccessor_new_api_test %S/Inputs/host_task_accessor.cpp -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Basic/buffer/buffer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
1+
// RUN: %clangxx %s -o %t1.out %sycl_options
22
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t2.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t2.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t2.out
8-
// UNSUPPORTED: cl_options
98

109
//==------------------- buffer.cpp - SYCL buffer basic test ----------------==//
1110
//

SYCL/Basic/buffer/buffer_container.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// RUN: %clangxx %s -std=c++17 -o %t1.out -lsycl -I %sycl_include
1+
// RUN: %clangxx %s %cxx_std_optionc++17 -o %t1.out %sycl_options
22
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
3-
// RUN: %clangxx -std=c++17 -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
3+
// RUN: %clangxx %cxx_std_optionc++17 -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t2.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t2.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t2.out
8-
// UNSUPPORTED: cl_options
98

109
#include <CL/sycl.hpp>
1110

SYCL/Basic/buffer/buffer_full_copy.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
1+
// RUN: %clangxx %s -o %t1.out %sycl_options
22
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t2.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t2.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t2.out
8-
// UNSUPPORTED: cl_options
98

109
//==------------- buffer_full_copy.cpp - SYCL buffer basic test ------------==//
1110
//

SYCL/Basic/device_code_dae.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// NOTE A temporary test before this compilation flow is enabled by default in
22
// driver
3-
// UNSUPPORTED: cuda,cl_options
3+
// UNSUPPORTED: cuda
44
// CUDA does not support SPIR-V.
5-
// RUN: %clangxx -fsycl-device-only -Xclang -fenable-sycl-dae -Xclang -fsycl-int-header=int_header.h %s -c -o device_code.bc -I %sycl_include -Wno-sycl-strict
6-
// RUN: %clangxx -include int_header.h -g -c %s -o host_code.o -I %sycl_include -Wno-sycl-strict
5+
// RUN: %clangxx -fsycl-device-only -Xclang -fenable-sycl-dae -Xclang -fsycl-int-header=int_header.h %s -c -o device_code.bc -Wno-sycl-strict
6+
// RUN: %clangxx %include_option int_header.h %debug_option -c %s -o host_code.o %sycl_options -Wno-sycl-strict
77
// RUN: llvm-link -o=linked_device_code.bc device_code.bc
88
// RUN: sycl-post-link -emit-param-info linked_device_code.bc
99
// RUN: llvm-spirv -o linked_device_code.spv linked_device_code.bc
1010
// RUN: echo -e -n "[Code|Properties]\nlinked_device_code.spv|linked_device_code_0.prop" > table.txt
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
13-
// RUN: %clangxx wrapper.o host_code.o -o app.exe -lsycl
13+
// RUN: %clangxx wrapper.o host_code.o -o app.exe %sycl_options
1414
// RUN: %BE_RUN_PLACEHOLDER ./app.exe
1515

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

SYCL/Basic/fpga_tests/fpga_aocx_win.cpp

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

99
// REQUIRES: aoc, accelerator
10-
// REQUIRES: system-windows, cl_options
10+
// REQUIRES: system-windows
1111

1212
/// E2E test for AOCX creation/use/run for FPGA
1313
// Produce an archive with device (AOCX) image. To avoid appending objects to

SYCL/Basic/fpga_tests/global_fpga_device_selector.cpp

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

3-
// RUN: %clangxx -fsycl -fintelfpga -std=c++17 %s -o %t.out
3+
// RUN: %clangxx -fsycl -fintelfpga %s -o %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

66
#include <CL/sycl.hpp>

SYCL/Basic/image/image_constructors.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
1+
// RUN: %clangxx %s -o %t1.out %sycl_options
22
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t2.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t2.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t2.out
8-
// UNSUPPORTED: cl_options
98
//
109
//==-------image_constructors.cpp - SYCL image constructors basic test------==//
1110
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

SYCL/Basic/parallel_for_indexers.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning
1+
// RUN: %clangxx %s -o %t1.out %sycl_options -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning
22
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t2.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t2.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t2.out
8-
// UNSUPPORTED: cl_options
98

109
// TODO: Unexpected result
1110
// TODO: _indexers.cpp:37: int main(): Assertion `id == -1' failed.

SYCL/Config/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// RUN: %clangxx -g -O0 -fsycl %s -o %t.out
8+
// RUN: %clangxx %debug_option -O0 -fsycl %s -o %t.out
99
// RUN: echo "SYCL_PRINT_EXECUTION_GRAPH=always" > %t.cfg
1010
// RUN: env SYCL_CONFIG_FILE_NAME=%t.cfg %t.out
1111
// RUN: ls | grep dot

SYCL/Config/env_vars.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: opencl
22
// Env vars are used to pass OpenCL-specific flags to PI compiling/linking.
33
//
4-
// RUN: %clangxx -O0 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lsycl
4+
// RUN: %clangxx -O0 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
55
//
66
// RUN: %CPU_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="-g" %t.out
77
// RUN: %GPU_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="-g" %t.out

SYCL/Config/kernel_from_file.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// UNSUPPORTED: cuda,cl_options
1+
// UNSUPPORTED: cuda
22
// CUDA does not support SPIR-V.
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
5-
// RUN: %clangxx -include %t.h %s -o %t.out -lsycl -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
5+
// RUN: %clangxx %include_option %t.h %s -o %t.out %sycl_options -Xclang -verify-ignore-unexpected=note,warning
66
// RUN: %BE_RUN_PLACEHOLDER env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
77
// CHECK: Passed
88

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
// RUN: %clangxx -fsycl -fsycl-link %S/std_complex_math_test.cpp -o %t_device.o
2-
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=std_complex_math_test_ihdr.h %S/std_complex_math_test.cpp -I %sycl_include -Wno-sycl-strict
2+
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=std_complex_math_test_ihdr.h %S/std_complex_math_test.cpp -Wno-sycl-strict
33
// >> host compilation...
4-
// RUN: %clangxx -include std_complex_math_test_ihdr.h -c %S/std_complex_math_test.cpp -o %t_host.o -I %sycl_include -Wno-sycl-strict
5-
// RUN: %clangxx %t_host.o %t_device.o -o %t.out -lsycl
4+
// RUN: %clangxx %include_option std_complex_math_test_ihdr.h -c %S/std_complex_math_test.cpp -o %t_host.o %sycl_options -Wno-sycl-strict
5+
// RUN: %clangxx %t_host.o %t_device.o -o %t.out %sycl_options
66
// RUN: %CPU_RUN_PLACEHOLDER %t.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t.out
88

99
// RUN: %clangxx -fsycl -fsycl-link %S/std_complex_math_fp64_test.cpp -o %t_fp64_device.o
10-
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=std_complex_math_fp64_test_ihdr.h %S/std_complex_math_fp64_test.cpp -I %sycl_include -Wno-sycl-strict
10+
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=std_complex_math_fp64_test_ihdr.h %S/std_complex_math_fp64_test.cpp -Wno-sycl-strict
1111
// >> host compilation...
12-
// RUN: %clangxx -include std_complex_math_fp64_test_ihdr.h -c %S/std_complex_math_fp64_test.cpp -o %t_fp64_host.o -I %sycl_include -Wno-sycl-strict
13-
// RUN: %clangxx %t_fp64_host.o %t_fp64_device.o -o %t_fp64.out -lsycl
12+
// RUN: %clangxx %include_option std_complex_math_fp64_test_ihdr.h -c %S/std_complex_math_fp64_test.cpp -o %t_fp64_host.o %sycl_options -Wno-sycl-strict
13+
// RUN: %clangxx %t_fp64_host.o %t_fp64_device.o -o %t_fp64.out %sycl_options
1414
// RUN: %CPU_RUN_PLACEHOLDER %t_fp64.out
1515
// RUN: %ACC_RUN_PLACEHOLDER %t_fp64.out
16-
// UNSUPPORTED: cl_options

SYCL/FunctionPointers/fp-as-kernel-arg.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// UNSUPPORTED: windows
21
// UNSUPPORTED: cuda
32
// CUDA does not support the function pointer as kernel argument extension.
43

5-
// RUN: %clangxx -Xclang -fsycl-allow-func-ptr -std=c++14 -fsycl %s -o %t.out
4+
// RUN: %clangxx -Xclang -fsycl-allow-func-ptr %cxx_std_optionc++14 -fsycl %s -o %t.out
65
// RUN: %HOST_RUN_PLACEHOLDER %t.out
76
// RUN: %CPU_RUN_PLACEHOLDER %t.out
87
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/FunctionPointers/pass-fp-through-buffer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// UNSUPPORTED: windows
21
// UNSUPPORTED: cuda
32
// CUDA does not support the function pointer as kernel argument extension.
43

5-
// RUN: %clangxx -Xclang -fsycl-allow-func-ptr -std=c++14 -fsycl %s -o %t.out
4+
// RUN: %clangxx -Xclang -fsycl-allow-func-ptr %cxx_std_optionc++14 -fsycl %s -o %t.out
65
// RUN: %HOST_RUN_PLACEHOLDER %t.out
76
// RUN: %CPU_RUN_PLACEHOLDER %t.out
87
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/OnlineCompiler/online_compiler_L0.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
// REQUIRES: level_zero, level_zero_headers
2-
// UNSUPPORTED: cl_options
1+
// REQUIRES: level_zero, level_zero_dev_kit
32

4-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -DRUN_KERNELS -lze_loader %s -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -DRUN_KERNELS %level_zero_options %s -o %t.out
54
// RUN: %CPU_RUN_PLACEHOLDER %t.out
65
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -lze_loader %s -o %th.out
6+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %th.out
87
// RUN: %HOST_RUN_PLACEHOLDER %th.out
98

109
// This test checks INTEL feature class online_compiler for Level-Zero.

SYCL/Plugin/interop-level-zero-keep-ownership.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// REQUIRES: level_zero,level_zero_headers
2-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out -lze_loader
1+
// REQUIRES: level_zero, level_zero_dev_kit
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %level_zero_options
33
// RUN: env SYCL_BE=PI_LEVEL_ZERO %GPU_RUN_PLACEHOLDER %t.out
44

55
// Test for Level Zero interop API where SYCL RT doesn't take ownership

SYCL/Plugin/interop-level-zero.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// REQUIRES: level_zero,level_zero_headers
2-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out -lze_loader
1+
// REQUIRES: level_zero, level_zero_dev_kit
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out
33
// RUN: env SYCL_BE=PI_LEVEL_ZERO %GPU_RUN_PLACEHOLDER %t.out
44

55
// Test for Level Zero interop API

SYCL/Plugin/interop-opencl.cpp

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

3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
44
// RUN: env SYCL_DEVICE_FILTER=opencl %CPU_RUN_PLACEHOLDER %t.out
55
// RUN: env SYCL_DEVICE_FILTER=opencl %GPU_RUN_PLACEHOLDER %t.out
66
// RUN: env SYCL_DEVICE_FILTER=opencl %ACC_RUN_PLACEHOLDER %t.out

SYCL/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ to be linked with. Make sure OpenCL ICD loader library is available in the
9494
system or library with full path passed to CMake configuration using the
9595
variable.
9696

97+
***LEVEL_ZERO_HEADERS*** - directory containing Level_Zero native headers,
98+
can be also set by LIT parameter level_zero_headers.
99+
100+
***LEVEL_ZERO_LIBS_DIR*** - directory containing Level_Zero native libraries,
101+
can be also set by LIT parameter level_zero_libs_dir.
102+
97103
It is asssumed that all required dependencies (OpenCL runtimes, CUDA SDK, AOT
98104
compilers, etc) are available in the system.
99105

@@ -147,6 +153,10 @@ ninja check
147153
* **extra_environment** - comma-separated list of variables with values to be
148154
added to test environment. Can be also set by LIT_EXTRA_ENVIRONMENT variable
149155
in cmake.
156+
* **level_zero_headers** - directory containing Level_Zero native headers,
157+
can be also set by CMake variable LEVEL_ZERO_HEADERS.
158+
* **level_zero_libs_dir** - directory containing Level_Zero native libraries,
159+
can be also set by CMake variable LEVEL_ZERO_LIBS_DIR.
150160

151161
# LIT features which can be used to configure test execution:
152162
* **windows**, **linux** - host OS;
@@ -158,7 +168,7 @@ ninja check
158168
OpenCL interoperability tests;
159169
* **aot_tool** - Ahead-of-time compilation tools are available, enables
160170
corresponding tests;
161-
* **level_zero_headers** - Level_Zero headers are available, the headers are
171+
* **level_zero_dev_kit** - Level_Zero headers and library are available,
162172
needed for Level_Zero interoperability tests;
163173
* **gpu-intel-dg1** - Intel GPU DG1 is available for testing;
164174
* **dump_ir**: is set to true if compiler supports dumping IR. Can be also

SYCL/Regression/cache_test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_include/.. -lze_loader %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out
22
// RUN: %GPU_RUN_PLACEHOLDER %t.out
33

4-
// REQUIRES: level_zero
5-
// UNSUPPORTED: cl_options
4+
// REQUIRES: level_zero, level_zero_dev_kit
65

76
#include <algorithm>
87
#include <level_zero/ze_api.h>

SYCL/Regression/implicit_offset_debug_info.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -g -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
1+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %GPU_RUN_PLACEHOLDER %t.out
33
// REQUIRES: cuda
44

@@ -16,4 +16,4 @@ int main() {
1616
[=](id<1> gtid) { table[gtid] = gtid[0]; });
1717
});
1818
q.wait();
19-
}
19+
}

SYCL/Regression/long_kernel_name.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_include/.. -lze_loader %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out
22
// RUN: %GPU_RUN_PLACEHOLDER %t.out
33

44
// REQUIRES: level_zero

SYCL/Scheduler/DataMovement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -g
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %debug_option
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/SeparateCompile/test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
// UNSUPPORTED: cuda,cl_options
1+
// UNSUPPORTED: cuda
22
// CUDA does not support SPIR-V.
33
//
44
// >> ---- compile src1
55
// >> device compilation...
6-
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -c -o a_kernel.bc -I %sycl_include -Wno-sycl-strict
6+
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -c -o a_kernel.bc -Wno-sycl-strict
77
// >> host compilation...
8-
// RUN: %clangxx -include sycl_ihdr_a.h -g -c %s -o a.o -I %sycl_include -Wno-sycl-strict
8+
// RUN: %clangxx %include_option sycl_ihdr_a.h %debug_option -c %s -o a.o %sycl_options -Wno-sycl-strict
99
//
1010
// >> ---- compile src2
1111
// >> device compilation...
12-
// RUN: %clangxx -DB_CPP=1 -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_b.h %s -c -o b_kernel.bc -I %sycl_include -Wno-sycl-strict
12+
// RUN: %clangxx -DB_CPP=1 -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_b.h %s -c -o b_kernel.bc -Wno-sycl-strict
1313
// >> host compilation...
14-
// RUN: %clangxx -DB_CPP=1 -include sycl_ihdr_b.h -g -c %s -o b.o -I %sycl_include -Wno-sycl-strict
14+
// RUN: %clangxx -DB_CPP=1 %include_option sycl_ihdr_b.h %debug_option -c %s -o b.o %sycl_options -Wno-sycl-strict
1515
//
1616
// >> ---- bundle .o with .spv
1717
// >> run bundler
@@ -36,7 +36,7 @@
3636
// RUN: %clangxx -c wrapper.bc -o wrapper.o
3737
//
3838
// >> ---- link the full hetero app
39-
// RUN: %clangxx wrapper.o a.o b.o -o app.exe -lsycl
39+
// RUN: %clangxx wrapper.o a.o b.o -o app.exe %sycl_options
4040
// RUN: %BE_RUN_PLACEHOLDER ./app.exe | FileCheck %s
4141
// CHECK: pass
4242

SYCL/SubGroup/generic_reduce.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -std=c++14 %s -o %t.out
2-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out
1+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda %s -o %t.out
2+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple -D SG_GPU %s -o %t_gpu.out
33
// RUN: %HOST_RUN_PLACEHOLDER %t.out
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out
55
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out

0 commit comments

Comments
 (0)