|
1 | 1 | // End-to-End test for testing device image compression when we |
2 | | -// separately compile and link device images for New Offloading Model. |
| 2 | +// separately compile and link device images. |
| 3 | +// This test is copied from Compression/compression_separate_compile.cpp |
| 4 | +// and modified to test with the New Offloading Model. |
3 | 5 |
|
4 | 6 | // REQUIRES: zstd, opencl-aot, cpu, linux |
5 | 7 |
|
|
11 | 13 |
|
12 | 14 | // CPU AOT targets host isa, so we compile everything on the run system instead. |
13 | 15 | ////////////////////// Compile device images |
14 | | -// RUN: %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL1' -DENABLE_KERNEL1 -c %s -o %t_kernel1_aot.o |
15 | | -// RUN: %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL2' -DENABLE_KERNEL2 -c %s -o %t_kernel2_aot.o |
| 16 | +// RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL1' -DENABLE_KERNEL1 -c %s -o %t_kernel1_aot.o |
| 17 | +// RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL2' -DENABLE_KERNEL2 -c %s -o %t_kernel2_aot.o |
16 | 18 |
|
17 | 19 | ////////////////////// Link device images |
18 | | -// RUN: %clangxx --offload-new-driver --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -v |
| 20 | +// RUN: %{run-aux} %clangxx --offload-new-driver --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -v |
19 | 21 |
|
20 | 22 | // Make sure the clang-linker-wrapper is called with the --compress when using the new offloading model |
21 | 23 | // option. |
22 | | -// RUN: %clangxx --offload-new-driver --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -### &> %t_driver_opts.txt |
| 24 | +// RUN: %{run-aux} %clangxx --offload-new-driver --offload-compress -fsycl -fsycl-link -fsycl-targets=spir64_x86_64 -fPIC %t_kernel1_aot.o %t_kernel2_aot.o -o %t_compressed_image.o -### &> %t_driver_opts.txt |
23 | 25 | // RUN: FileCheck -input-file=%t_driver_opts.txt %s --check-prefix=CHECK-DRIVER-OPTS |
24 | 26 |
|
25 | 27 | // CHECK-DRIVER-OPTS: clang-linker-wrapper{{.*}} "--compress" |
26 | 28 |
|
27 | 29 | ////////////////////// Compile the host program |
28 | | -// RUN: %clangxx --offload-new-driver -fsycl -std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -c %s -o %t_main.o |
| 30 | +// RUN: %{run-aux} %clangxx --offload-new-driver -fsycl -std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -c %s -o %t_main.o |
29 | 31 |
|
30 | 32 | ////////////////////// Link the host program and compressed device images |
31 | | -// RUN: %clangxx --offload-new-driver -fsycl %t_main.o %t_kernel1_aot.o %t_kernel2_aot.o %t_compressed_image.o -o %t_compress.out |
| 33 | +// RUN: %{run-aux} %clangxx --offload-new-driver -fsycl %t_main.o %t_kernel1_aot.o %t_kernel2_aot.o %t_compressed_image.o -o %t_compress.out |
32 | 34 |
|
33 | 35 | // RUN: %{run} %t_compress.out |
34 | 36 |
|
|
0 commit comments