Skip to content

Commit

Permalink
[Windows XPU] Fix MSVC ambiguous symbol error (pytorch#138727)
Browse files Browse the repository at this point in the history
PT master build with XPU will fail due to MSVC issue of ambiguous symbol error 'std', previously fixed it with MSVC flag in torch-xpu-ops https://github.com/intel/torch-xpu-ops/pull/946/files, but the error is observed in PT master too after 2.5 and oneAPI update.

Pull Request resolved: pytorch#138727
Approved by: https://github.com/guangyey, https://github.com/ezyang
  • Loading branch information
ratnampa authored and pytorchmergebot committed Nov 8, 2024
1 parent a3052b3 commit 0b7a2d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caffe2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,9 @@ if(USE_XPU)
add_library(torch_xpu ${Caffe2_XPU_SRCS})
torch_compile_options(torch_xpu) # see cmake/public/utils.cmake
target_compile_definitions(torch_xpu PRIVATE USE_XPU)
if(WIN32)
target_compile_options(torch_xpu PRIVATE /permissive-)
endif()

# ATen XPU implementation
set(TORCH_XPU_OPS_DIR ${TORCH_ROOT}/third_party/torch-xpu-ops)
Expand Down

0 comments on commit 0b7a2d4

Please sign in to comment.