File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 11include (CheckCXXCompilerFlag )
22set (obj_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} " )
33if (MSVC )
4- set (obj-suffix obj)
54 set (devicelib_host_static_obj sycl-devicelib-host.lib)
65else ()
7- set (obj-suffix o)
86 set (devicelib_host_static_obj libsycl-devicelib-host.a)
97endif ()
108set (bc-suffix bc)
@@ -69,7 +67,7 @@ endif()
6967
7068add_custom_target (libsycldevice )
7169
72- set (filetypes obj bc)
70+ set (filetypes bc)
7371
7472foreach (filetype IN LISTS filetypes)
7573 add_custom_target (libsycldevice-${filetype} )
@@ -97,7 +95,6 @@ endif()
9795
9896
9997set (bc_device_compile_opts -fsycl-device-only -fsycl-device-obj=llvmir)
100- set (obj_device_compile_opts -fsycl -c ${sycl_targets_opt} --no -offload-new-driver)
10198
10299# Compiles and installs a single device library.
103100#
@@ -664,6 +661,8 @@ foreach(datatype IN ITEMS fp32 fp64 bf16)
664661 DEPENDS ${imf_${datatype}_fallback_src} )
665662endforeach ()
666663
664+ add_custom_target (libsycldevice-obj )
665+ add_dependencies (libsycldevice libsycldevice-obj )
667666# Adds Intel math functions libraries.
668667#
669668# Arguments:
Original file line number Diff line number Diff line change 44// As we are doing a separate device compilation here, we need to explicitly
55// add the device lib instrumentation (itt_compiler_wrapper)
66// RUN: %clangxx -Wno-error=ignored-attributes -DUSED_KERNEL -fno-sycl-dead-args-optimization %cxx_std_optionc++17 -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -o %t.bc -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
7- // >> ---- unbundle compiler wrapper and asan device objects
8- // RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=%t_compiler_wrappers.bc -unbundle
9- // RUN: %if linux %{ clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-asan%obj_ext -output=%t_asan.bc -unbundle %}
107// >> ---- link device code
11- // RUN: %if linux %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers .bc %t_asan .bc %} %else %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers .bc %}
8+ // RUN: %if linux %{ llvm-link -o=%t_app.bc %t.bc %sycl_static_libs_dir/libsycl-itt-compiler-wrappers .bc %sycl_static_libs_dir/libsycl-asan .bc %} %else %{ llvm-link -o=%t_app.bc %t.bc %sycl_static_libs_dir/libsycl-itt-compiler-wrappers .bc %}
129// >> ---- translate to SPIR-V
1310// RUN: llvm-spirv -o %t.spv %t_app.bc
1411// Need to perform full compilation here since the SYCL runtime uses image
Original file line number Diff line number Diff line change 3333//
3434// As we are doing a separate device compilation here, we need to explicitly
3535// add the device lib instrumentation (itt_compiler_wrapper)
36- // >> ---- unbundle compiler wrapper device object
37- // 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
38- // 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
39- // 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
4036//
4137// >> ---- link device code
42- // RUN: llvm-link -o=app.bc a_kernel.bc b_kernel.bc compiler_wrappers .bc itt_stubs .bc user_wrappers .bc
38+ // 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
4339//
4440// >> ---- produce entries data
4541// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.table app.bc
You can’t perform that action at this time.
0 commit comments