|
19 | 19 | // RUN: 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 |
20 | 20 |
|
21 | 21 | // >> ---- produce entries data |
22 | | -// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.table app.bc |
| 22 | +// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.table app.bc |
23 | 23 | // |
24 | 24 | // >> ---- do table transformations from bc to spv entries |
25 | 25 | // RUN: file-table-tform -extract=Code -drop_titles -o test_spv_in.table test.table |
|
37 | 37 | // RUN: %clangxx wrapper.o a.o b.o -Wno-unused-command-line-argument -o app.exe %sycl_options |
38 | 38 | // RUN: %{run} ./app.exe |
39 | 39 |
|
40 | | -// Check backward compatibility: verify that legacy SYCL object files can be unbundled to extract device code as in previous workflows. |
| 40 | +// Check backward compatibility: verify that SYCL object files can be unbundled to extract device code as in old-offloading-model workflows. |
41 | 41 | // >> ---- bundle .o with .spv |
42 | 42 | // >> run bundler |
43 | | -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=a.o -input=a_kernel.bc -output=a_fat.o |
44 | | -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=b.o -input=b_kernel.bc -output=b_fat.o |
| 43 | +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=a.o -input=a_kernel.bc -output=a_fat.old.o |
| 44 | +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=b.o -input=b_kernel.bc -output=b_fat.old.o |
45 | 45 | // |
46 | 46 | // >> ---- unbundle fat objects |
47 | | -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=a.o -output=a_kernel.bc -input=a_fat.o -unbundle |
48 | | -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=b.o -output=b_kernel.bc -input=b_fat.o -unbundle |
| 47 | +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=a.old.o -output=a_kernel.old.bc -input=a_fat.old.o -unbundle |
| 48 | +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=b.old.o -output=b_kernel.old.bc -input=b_fat.old.o -unbundle |
49 | 49 | // |
50 | 50 | // As we are doing a separate device compilation here, we need to explicitly |
51 | 51 | // add the device lib instrumentation (itt_compiler_wrapper) |
52 | 52 | // >> ---- unbundle compiler wrapper device object |
53 | | -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=compiler_wrappers.bc -unbundle |
54 | | -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-stubs%obj_ext -output=itt_stubs.bc -unbundle |
55 | | -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-user-wrappers%obj_ext -output=user_wrappers.bc -unbundle |
| 53 | +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers.old%obj_ext -output=compiler_wrappers.old.bc -unbundle |
| 54 | +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-stubs.old%obj_ext -output=itt_stubs.old.bc -unbundle |
| 55 | +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-user-wrappers.old%obj_ext -output=user_wrappers.old.bc -unbundle |
56 | 56 | // |
57 | 57 | // >> ---- link device code |
58 | | -// RUN: llvm-link -o=app.bc a_kernel.bc b_kernel.bc compiler_wrappers.bc itt_stubs.bc user_wrappers.bc |
59 | | - |
60 | | - |
| 58 | +// RUN: llvm-link -o=app.old.bc a_kernel.old.bc b_kernel.old.bc compiler_wrappers.old.bc itt_stubs.old.bc user_wrappers.old.bc |
| 59 | +// |
| 60 | +// >> ---- produce entries data |
| 61 | +// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.old.table app.old.bc |
| 62 | +// |
| 63 | +// >> ---- do table transformations from bc to spv entries |
| 64 | +// RUN: file-table-tform -extract=Code -drop_titles -o test_spv_in.old.table test.old.table |
| 65 | +// RUN: llvm-foreach --in-file-list=test_spv_in.old.table --in-replace=test_spv_in.old.table --out-ext=spv --out-file-list=test_spv_out.old.table --out-replace=test_spv_out.old.table -- llvm-spirv -o test_spv_out.old.table -spirv-allow-extra-diexpressions -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=-all test_spv_in.old.table |
| 66 | +// RUN: file-table-tform -replace=Code,Code -o test_spv.old.table test.old.table test_spv_out.old.table |
| 67 | +// |
| 68 | +// >> ---- wrap device binary |
| 69 | +// >> produce .bc |
| 70 | +// RUN: clang-offload-wrapper -o wrapper.old.bc -host=x86_64 -kind=sycl -target=spir64 -batch test_spv.old.table |
| 71 | +// |
| 72 | +// >> compile .bc to .o |
| 73 | +// RUN: %clangxx -Wno-error=override-module -c wrapper.old.bc -o wrapper.old.o %if preview-mode %{-Wno-unused-command-line-argument%} |
| 74 | +// |
| 75 | +// >> ---- link the full hetero app |
| 76 | +// RUN: %clangxx wrapper.old.o a.old.o b.old.o -Wno-unused-command-line-argument -o app.old.exe %sycl_options |
| 77 | +// RUN: %{run} ./app.old.exe |
61 | 78 |
|
62 | 79 | //==----------- test.cpp - Tests SYCL separate compilation -----------------==// |
63 | 80 | // |
|
0 commit comments