Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions sycl/test-e2e/AOT/multiple-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
//
// A modified test can be found at NewOffloadDriver/aot-multiple-device.cpp

// XFAIL: new-offload-model && run-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20797

// REQUIRES: opencl-aot, ocloc, any-device-is-cpu, any-device-is-gpu, target-spir, opencl-cpu-rt

// Produce a fat object for all targets (generic SPIR-V, CPU, GPU)
Expand Down
43 changes: 43 additions & 0 deletions sycl/test-e2e/NewOffloadDriver/separate_compile.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//==--------------- separate_compile.cpp -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// This test is copied from SeparateCompile/test.cpp
// and modified to test with the New Offloading Model.

// REQUIRES: target-spir
// >> ---- compile src1
// >> device compilation...
// RUN: %{run-aux} %clangxx --offload-new-driver -DSYCL_DISABLE_FALLBACK_ASSERT -fno-sycl-dead-args-optimization -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -o a_kernel.bc -Wno-sycl-strict
// >> host compilation...
// RUN: %{run-aux} %clangxx --offload-new-driver -Wno-error=ignored-attributes %sycl_include -Wno-error=unused-command-line-argument -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option sycl_ihdr_a.h %debug_option -c %s -o a.o %sycl_options -fno-sycl-dead-args-optimization -Wno-sycl-strict
//
// >> ---- compile src2
// >> device compilation...
// RUN: %{run-aux} %clangxx --offload-new-driver -Wno-error=unused-command-line-argument -DSYCL_DISABLE_FALLBACK_ASSERT -DB_CPP=1 -fno-sycl-dead-args-optimization -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_b.h %s -o b_kernel.bc -Wno-sycl-strict
// >> host compilation...
// RUN:%{run-aux} %clangxx --offload-new-driver -Wno-error=ignored-attributes %sycl_include -Wno-error=unused-command-line-argument -DSYCL_DISABLE_FALLBACK_ASSERT -DB_CPP=1 %cxx_std_optionc++17 %include_option sycl_ihdr_b.h %debug_option -c %s -o b.o %sycl_options -fno-sycl-dead-args-optimization -Wno-sycl-strict
//
// >> ---- link device code
// RUN: %{run-aux} llvm-link -o=app.bc a_kernel.bc b_kernel.bc %sycl_static_libs_dir/libsycl-itt-compiler-wrappers.bc %sycl_static_libs_dir/libsycl-itt-stubs.bc %sycl_static_libs_dir/libsycl-itt-user-wrappers.bc
// >> ---- produce entries data
// RUN: %{run-aux} sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.table app.bc
//
// >> ---- do table transformations from bc to spv entries
// RUN: %{run-aux} file-table-tform -extract=Code -drop_titles -o test_spv_in.table test.table
// RUN: %{run-aux} llvm-foreach --in-file-list=test_spv_in.table --in-replace=test_spv_in.table --out-ext=spv --out-file-list=test_spv_out.table --out-replace=test_spv_out.table -- llvm-spirv -o test_spv_out.table -spirv-allow-extra-diexpressions -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=-all test_spv_in.table
// RUN: %{run-aux} file-table-tform -replace=Code,Code -o test_spv.table test.table test_spv_out.table
//
// >> ---- wrap device binary
// >> produce .bc
// RUN: %{run-aux} clang-offload-wrapper -o wrapper.bc -host=x86_64 -kind=sycl -target=spir64 -batch test_spv.table
//
// >> compile .bc to .o
// RUN: %{run-aux} %clangxx --offload-new-driver -Wno-error=override-module -c wrapper.bc -o wrapper.o %if preview-mode %{-Wno-unused-command-line-argument%}
//
// >> ---- link the full hetero app
// RUN:%{run-aux} %clangxx wrapper.o a.o b.o -Wno-unused-command-line-argument -o app.exe %sycl_options
// RUN: %{run} ./app.exe
10 changes: 7 additions & 3 deletions sycl/test-e2e/SeparateCompile/test.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// XFAIL: new-offload-model
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20797

// REQUIRES: target-spir
//
// UNSUPPORTED: new-offload-model
// This test is not supported with the new offloading model because
// clang-offload-bundler only works with the old model for extracting
// device code from libraries.
//
// A modified test can be found at NewOffloadDriver/separate_compile.cpp
//
// FIXME Disabled fallback assert as it'll require either online linking or
// explicit offline linking step here
// FIXME separate compilation requires -fno-sycl-dead-args-optimization
Expand Down
Loading