Skip to content

Commit 3cc29b1

Browse files
committed
"[Don't Review] Test XPU CI"
This reverts commit 0df78f0. ghstack-source-id: 503a42b Pull Request resolved: #159718 Revert "[inductor] respect layout tags for ops with registered lowerings (#159134)" This reverts commit 669009b.
1 parent 07fad04 commit 3cc29b1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmake/public/utils.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,14 @@ function(torch_compile_options libname)
362362
# For MS official doc: https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor
363363
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor" PARENT_SCOPE)
364364

365+
if(${MSVC_TOOLSET_VERSION} GREATER_EQUAL 143)
366+
# Add /d2implyavx512upperregs- to disable compiler over-aggressive optimization, which caused involeved AVX512 register on AVX2 machine.
367+
# Reference: https://github.com/pytorch/pytorch/issues/145702#issuecomment-2874029459
368+
target_compile_options(${libname} PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/d2implyavx512upperregs->)
369+
endif()
370+
371+
372+
365373
target_compile_options(${libname} PUBLIC
366374
$<$<COMPILE_LANGUAGE:CXX>:
367375
${MSVC_RUNTIME_LIBRARY_OPTION}

0 commit comments

Comments
 (0)