Skip to content

Commit a447201

Browse files
[SYCL][E2E] Add AOT-only SYCLBIN tests (#20707)
This commit adds variants to the executable target SYCLBIN tests that only creates SYCLBINs with AOT binary images for BMG G21. This is to help test that AOT works for SYCLBIN, avoiding tests always falling back to SPIR-V and giving the false impression that AOT works as intended. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent 26b9522 commit a447201

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// REQUIRES: aspect-usm_device_allocations, ocloc, arch-intel_gpu_bmg_g21
2+
3+
// -- Basic test for compiling and loading a SYCLBIN kernel_bundle in executable
4+
// -- state using only AOT target for BMG G21.
5+
6+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" %S/Inputs/basic_kernel.cpp -o %t.syclbin
7+
// RUN: %{build} -o %t.out
8+
// RUN: %{run} %t.out %t.syclbin
9+
10+
#define SYCLBIN_EXECUTABLE_STATE
11+
12+
#include "Inputs/basic.hpp"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// REQUIRES: aspect-usm_device_allocations, ocloc, arch-intel_gpu_bmg_g21
2+
3+
// -- Test for using a kernel from a SYCLBIN with a dead argument using only AOT
4+
// target for BMG G21.
5+
6+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" %S/Inputs/dae_kernel.cpp -o %t.syclbin
7+
// RUN: %{build} -o %t.out
8+
// RUN: %{run} %t.out %t.syclbin
9+
10+
#define SYCLBIN_EXECUTABLE_STATE
11+
12+
#include "Inputs/dae.hpp"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// REQUIRES: aspect-usm_device_allocations, ocloc, arch-intel_gpu_bmg_g21
2+
3+
// -- Test for using device globals in SYCLBIN using only AOT target for BMG
4+
// G21.
5+
6+
// UNSUPPORTED: opencl && gpu
7+
// UNSUPPORTED-TRACKER: GSD-4287
8+
9+
// UNSUPPORTED: cuda
10+
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/19533
11+
12+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" %S/Inputs/dg_kernel.cpp -o %t.syclbin
13+
// RUN: %{build} -o %t.out
14+
// RUN: %{run} %t.out %t.syclbin
15+
16+
#define SYCLBIN_EXECUTABLE_STATE
17+
18+
#include "Inputs/dg.hpp"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// REQUIRES: aspect-usm_device_allocations, ocloc, arch-intel_gpu_bmg_g21
2+
3+
// -- Test for compiling and loading a kernel bundle with a SYCLBIN containing
4+
// the use of optional kernel features using only AOT target for BMG G21.
5+
6+
// RUN: %clangxx --offload-new-driver -fsyclbin=executable -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" %S/Inputs/optional_kernel_features.cpp -o %t.syclbin
7+
// RUN: %{build} -o %t.out
8+
// RUN: %{run} %t.out %t.syclbin
9+
10+
#define SYCLBIN_EXECUTABLE_STATE
11+
12+
#include "Inputs/optional_kernel_features.hpp"

0 commit comments

Comments
 (0)