Skip to content

Commit ed01046

Browse files
committed
fix Windows cmake for BUILD_SEPARATE_OPS
1 parent 8fa9749 commit ed01046

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/BuildOnWindows.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ macro(setup_common_libraries)
88
torch_xpu_ops
99
STATIC
1010
${ATen_XPU_CPP_SRCS})
11-
set(PATH_TO_TORCH_XPU_OPS_ATEN_LIB \"torch_xpu_ops_aten.dll\")
12-
target_compile_options(torch_xpu_ops PRIVATE -DPATH_TO_TORCH_XPU_OPS_ATEN_LIB=${PATH_TO_TORCH_XPU_OPS_ATEN_LIB})
1311

1412
add_library(
1513
torch_xpu_ops_aten
@@ -33,6 +31,7 @@ if(BUILD_SEPARATE_OPS)
3331
${sycl_lib}
3432
SHARED
3533
SYCL_SOURCES ${sycl_src})
34+
target_compile_definitions(${sycl_lib} PRIVATE TORCH_XPU_BUILD_MAIN_LIB)
3635
target_link_libraries(torch_xpu_ops_aten PUBLIC ${sycl_lib})
3736
list(APPEND TORCH_XPU_OPS_LIBRARIES ${sycl_lib})
3837

0 commit comments

Comments
 (0)