|
1 | 1 | // End-to-End test for testing device image compression when we |
2 | 2 | // separately compile and link device images. |
3 | | -// This test is copied from compression_separate_compile.cpp and adapted |
4 | | -// to use the New Offloading Model. |
| 3 | +// This test is copied from Compression/compression_separate_compile.cpp |
| 4 | +// and modified to test with the New Offloading Model. |
5 | 5 |
|
6 | 6 | // REQUIRES: zstd, opencl-aot, cpu, linux |
7 | 7 |
|
|
13 | 13 |
|
14 | 14 | // CPU AOT targets host isa, so we compile everything on the run system instead. |
15 | 15 | ////////////////////// Compile device images |
16 | | -// RUN: %{run-aux} %clangxx --no-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 --no-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 |
18 | 18 |
|
19 | 19 | ////////////////////// Link device images |
20 | | -// RUN: %{run-aux} %clangxx --no-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 |
21 | 21 |
|
22 | 22 | // Make sure the clang-linker-wrapper is called with the --compress when using the new offloading model |
23 | 23 | // option. |
24 | | -// RUN: %{run-aux} %clangxx --no-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 |
| 25 | +// RUN: FileCheck -input-file=%t_driver_opts.txt %s --check-prefix=CHECK-DRIVER-OPTS |
25 | 26 |
|
26 | 27 | // CHECK-DRIVER-OPTS: clang-linker-wrapper{{.*}} "--compress" |
27 | 28 |
|
28 | 29 | ////////////////////// Compile the host program |
29 | | -// RUN: %{run-aux} %clangxx --no-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 |
30 | 31 |
|
31 | 32 | ////////////////////// Link the host program and compressed device images |
32 | | -// RUN: %{run-aux} %clangxx --no-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 |
33 | 34 |
|
34 | 35 | // RUN: %{run} %t_compress.out |
35 | 36 |
|
|
0 commit comments