Skip to content

Commit d6928aa

Browse files
[SYCL][E2E][SYCLBIN] Add back mixed opt SYCLBIN tests (#19576)
#19547 unintentionally removed the mixed optimization level tests for SYCLBIN. This commit adds them back. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent f8ed65d commit d6928aa

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//==--------- link_mixed_opt_input.cpp --- SYCLBIN extension tests ---------==//
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: aspect-usm_shared_allocations
10+
11+
// -- Test for linking two SYCLBIN kernel_bundles with different optimization
12+
// -- levels.
13+
14+
// ptxas currently fails to compile images with unresolved symbols. Disable for
15+
// other targets than SPIR-V until this has been resolved. (CMPLRLLVM-68810)
16+
// Note: %{sycl_target_opts} should be added to the SYCLBIN compilation lines
17+
// once fixed.
18+
// REQUIRES: target-spir
19+
20+
// RUN: %clangxx --offload-new-driver -fsyclbin=input -fsycl-allow-device-image-dependencies -O0 %S/Inputs/exporting_function.cpp -o %t.export.syclbin
21+
// RUN: %clangxx --offload-new-driver -fsyclbin=input -fsycl-allow-device-image-dependencies -O1 %S/Inputs/importing_kernel.cpp -o %t.import.syclbin
22+
// RUN: %{build} -o %t.out
23+
// RUN: %{run} %t.out %t.export.syclbin %t.import.syclbin
24+
25+
#define SYCLBIN_INPUT_STATE
26+
27+
#include "Inputs/link.hpp"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//==--------- link_mixed_opt_input.cpp --- SYCLBIN extension tests ---------==//
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: aspect-usm_shared_allocations
10+
11+
// -- Test for linking two SYCLBIN kernel_bundle with different optimization
12+
// -- levels.
13+
14+
// ptxas currently fails to compile images with unresolved symbols. Disable for
15+
// other targets than SPIR-V until this has been resolved. (CMPLRLLVM-68810)
16+
// Note: %{sycl_target_opts} should be added to the SYCLBIN compilation lines
17+
// once fixed.
18+
// REQUIRES: target-spir
19+
20+
// RUN: %clangxx --offload-new-driver -fsyclbin=object -fsycl-allow-device-image-dependencies -O0 %S/Inputs/exporting_function.cpp -o %t.export.syclbin
21+
// RUN: %clangxx --offload-new-driver -fsyclbin=object -fsycl-allow-device-image-dependencies -O1 %S/Inputs/importing_kernel.cpp -o %t.import.syclbin
22+
// RUN: %{build} -o %t.out
23+
// RUN: %{run} %t.out %t.export.syclbin %t.import.syclbin
24+
25+
#define SYCLBIN_OBJECT_STATE
26+
27+
#include "Inputs/link.hpp"

0 commit comments

Comments
 (0)