Skip to content

Commit 7c9bd09

Browse files
[SYCL] Copy llvm-test-suite/SYCL/AOT/{gpu,cpu}.cpp tests to sycl/test-e2e (#8480)
sycl/test-e2e/AOT/gpu.cpp is using %gpu_aot_target_opts substitution and I need it to verify some internal infrastructure changes. The cpu.cpp is copied just in case/for "completeness".
1 parent f439f08 commit 7c9bd09

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

sycl/test-e2e/AOT/cpu.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//==--- cpu.cpp - AOT compilation for cpu devices using opencl-aot --------==//
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: opencl-aot, cpu
10+
11+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out
12+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
13+
14+
// Test that opencl-aot can handle multiple build options.
15+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -Xsycl-target-backend "--bo=-g" -Xsycl-target-backend "--bo=-cl-opt-disable" -o %t2.out

sycl/test-e2e/AOT/gpu.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//==--- gpu.cpp - AOT compilation for gen devices using GEN compiler ------==//
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
10+
// UNSUPPORTED: cuda
11+
// CUDA is not compatible with SPIR.
12+
//
13+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %S/Inputs/aot.cpp -o %t.out
14+
// RUN: %GPU_RUN_PLACEHOLDER %t.out

0 commit comments

Comments
 (0)