Skip to content

Commit c7b0546

Browse files
authored
[SYCL] Remove object format devicelib files (#21711)
In #21672, we removed .new.o format devicelib file and use .bc format devicelib files for both new and old offloading model driver. This PR removes .o format devicelib files since they are not used in current pipeline either. --------- Signed-off-by: jinge90 <ge.jin@intel.com>
1 parent 3b1dcb7 commit c7b0546

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
include(CheckCXXCompilerFlag)
22
set(obj_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
33
if (MSVC)
4-
set(obj-suffix obj)
54
set(devicelib_host_static_obj sycl-devicelib-host.lib)
65
else()
7-
set(obj-suffix o)
86
set(devicelib_host_static_obj libsycl-devicelib-host.a)
97
endif()
108
set(bc-suffix bc)
@@ -69,7 +67,7 @@ endif()
6967

7068
add_custom_target(libsycldevice)
7169

72-
set(filetypes obj bc)
70+
set(filetypes bc)
7371

7472
foreach(filetype IN LISTS filetypes)
7573
add_custom_target(libsycldevice-${filetype})
@@ -97,7 +95,6 @@ endif()
9795

9896

9997
set(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})
665662
endforeach()
666663

664+
add_custom_target(libsycldevice-obj)
665+
add_dependencies(libsycldevice libsycldevice-obj)
667666
# Adds Intel math functions libraries.
668667
#
669668
# Arguments:

sycl/test-e2e/Config/kernel_from_file.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
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

sycl/test-e2e/SeparateCompile/test.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,9 @@
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

0 commit comments

Comments
 (0)