File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -26,22 +26,30 @@ endmacro()
2626
2727if (BUILD_SEPARATE_OPS)
2828 message ("!!!!! BUILD_SEPARATE_OPS: ${BUILD_SEPARATE_OPS} - 1" )
29- setup_common_libraries()
29+ add_library (
30+ torch_xpu_ops
31+ STATIC
32+ ${ATen_XPU_CPP_SRCS}
33+ ${ATen_XPU_MKL_SRCS}
34+ ${ATen_XPU_NATIVE_CPP_SRCS}
35+ ${ATen_XPU_GEN_SRCS} )
36+ target_compile_definitions (torch_xpu_ops PRIVATE TORCH_XPU_BUILD_MAIN_LIB)
37+
3038 foreach (sycl_src ${ATen_XPU_SYCL_SRCS} )
3139 get_filename_component (name ${sycl_src} NAME_WLE REALPATH)
3240 set (sycl_lib torch-xpu-ops-sycl-${name} )
3341 sycl_add_library(
3442 ${sycl_lib}
3543 SHARED
3644 SYCL_SOURCES ${sycl_src} )
37- target_link_libraries (torch_xpu_ops_aten PUBLIC ${sycl_lib} )
45+ target_link_libraries (torch_xpu_ops PUBLIC ${sycl_lib} )
3846 list (APPEND TORCH_XPU_OPS_LIBRARIES ${sycl_lib} )
3947
4048 # Decouple with PyTorch cmake definition.
4149 install (TARGETS ${sycl_lib} DESTINATION "${TORCH_INSTALL_LIB_DIR} " )
4250 endforeach ()
51+
4352 list (APPEND TORCH_XPU_OPS_LIBRARIES torch_xpu_ops)
44- list (APPEND TORCH_XPU_OPS_LIBRARIES torch_xpu_ops_aten)
4553# Working with the compilers which don't support device code compression, we have to split kernels
4654# into multiple libraries to meet the bin size limitation.
4755elseif (BUILD_SPLIT_KERNEL_LIB OR __INTEL_LLVM_COMPILER LESS 20250004 OR ICX_DATE LESS 20241205)
You can’t perform that action at this time.
0 commit comments