Skip to content

Commit 98cd464

Browse files
[SYCL][E2E] Add AOT options to executable SYCLBIN tests (#19466)
This commit adds SPIR-V AOT options to SYCLBIN tests using executable state. This should improve coverage on the included devices. The device targets should be expanded when #19373 has been fixed. --------- Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 08c6899 commit 98cd464

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

sycl/test-e2e/SYCLBIN/basic_executable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// -- Basic test for compiling and loading a SYCLBIN kernel_bundle in executable
1212
// -- state.
1313

14-
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %S/Inputs/basic_kernel.cpp -o %t.syclbin
14+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %{syclbin_exec_opts} %S/Inputs/basic_kernel.cpp -o %t.syclbin
1515
// RUN: %{build} -o %t.out
1616
// RUN: %{l0_leak_check} %{run} %t.out %t.syclbin
1717

sycl/test-e2e/SYCLBIN/dae_executable.cpp

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

1111
// -- Test for using a kernel from a SYCLBIN with a dead argument.
1212

13-
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %S/Inputs/dae_kernel.cpp -o %t.syclbin
13+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %{syclbin_exec_opts} %S/Inputs/dae_kernel.cpp -o %t.syclbin
1414
// RUN: %{build} -o %t.out
1515
// RUN: %{l0_leak_check} %{run} %t.out %t.syclbin
1616

sycl/test-e2e/SYCLBIN/dg_executable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// UNSUPPORTED: opencl && gpu
1414
// UNSUPPORTED-TRACKER: GSD-4287
1515

16-
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %S/Inputs/dg_kernel.cpp -o %t.syclbin
16+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %{syclbin_exec_opts} %S/Inputs/dg_kernel.cpp -o %t.syclbin
1717
// RUN: %{build} -o %t.out
1818
// RUN: %{l0_leak_check} %{run} %t.out %t.syclbin
1919

sycl/test-e2e/SYCLBIN/lit.local.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
syclbin_exec_opts = ""
2+
if 'target-spir' in config.available_features and 'ocloc' in config.available_features:
3+
# Due to a bug in clang-linker-wrapper we cannot use -device * on Windows, so
4+
# we pick specific targets for now. Once that is fixed we can switch to the
5+
# wildcard. See https://github.com/intel/llvm/issues/19373.
6+
syclbin_exec_opts = '-fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device pvc,dg2,bmg-g21"'
7+
config.substitutions.append(('%{syclbin_exec_opts}', format(syclbin_exec_opts)))

sycl/test-e2e/SYCLBIN/optional_kernel_features_executable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// -- Test for compiling and loading a kernel bundle with a SYCLBIN containing
1212
// the use of optional kernel features.
1313

14-
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %S/Inputs/optional_kernel_features.cpp -o %t.syclbin
14+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable %{sycl_target_opts} %{syclbin_exec_opts} %S/Inputs/optional_kernel_features.cpp -o %t.syclbin
1515
// RUN: %{build} -o %t.out
1616
// RUN: %{l0_leak_check} %{run} %t.out %t.syclbin
1717

0 commit comments

Comments
 (0)