Skip to content

Commit 420ac96

Browse files
[SYCL][NFC] Add E2E test for gpu AOT to JIT fallback (#18492)
I believe the feature of AOT to JIT fallback was implemented and enabled in this commit 38e588d commit includes UT for jit fallback for kernel compiled for older platform 38e588d this fallback works when `-fsycl-targets` is set for compilation and AOT images contain info about architecture it is built for. In order to build program SYCL RT choose images by compile target (if property is set) and adds spirv (if available) to the image set passed to backend later. Choice what image to use is done in UR adapter for specific backend. Where it chooses AOT image if available and uses SPIRV as fallback. While RT part is completely tested by UT, adding small E2E test to verify stack behavior. --------- Signed-off-by: Tikhomirova, Kseniya <[email protected]> Co-authored-by: Marcos Maronas <[email protected]>
1 parent 343802d commit 420ac96

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

sycl/test-e2e/AOT/fallback.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//==-- fallback.cpp - Fallback to JIT if there is no appropriate AOT image--==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
// REQUIRES: ocloc, gpu, target-spir
10+
// UNSUPPORTED: gpu-intel-gen12
11+
// UNSUPPORTED-INTENDED: Remove support for platform used as compile target
12+
// since AOT image should be not applicable.
13+
14+
// AOT-compiled image for absent gen platform, run on GPU.
15+
// RUN: %clangxx -fsycl -fsycl-targets=spir64,intel_gpu_tgl %S/Inputs/aot.cpp -o %t_spv_gpu.out
16+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" SYCL_UR_TRACE=2 %{run-unfiltered-devices} %t_spv_gpu.out | FileCheck %s
17+
18+
// CHECK: ---> urProgramCreateWithIL
19+
// CHECK-NOT: ---> urProgramCreateWithBinary

0 commit comments

Comments
 (0)