mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[ROCm][Windows] Run hipcc with compatibility flags. (#153986)
See also https://github.com/ROCm/TheRock/issues/590. Including the `-Wno-ignored-attributes` flag here avoids 700MB of log warning spam while compiling and the `-fms-extensions` seems beneficial to include: https://clang.llvm.org/docs/MSVCCompatibility.html. Co-authored-by: Aaryaman Vasishta <jem456.vasishta@gmail.com> Co-authored-by: Scott Todd <scott.todd0@gmail.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/153986 Approved by: https://github.com/Skylion007, https://github.com/jeffdaily Co-authored-by: Aaryaman Vasishta <jem456.vasishta@gmail.com>
This commit is contained in:
parent
3c89cfd460
commit
0e5f2339d0
|
|
@ -1733,6 +1733,10 @@ if(USE_ROCM)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND HIP_CXX_FLAGS "-fms-extensions")
|
||||
endif()
|
||||
|
||||
# Call again since Caffe2_HIP_INCLUDE is extended with ATen include dirs.
|
||||
hip_include_directories(${Caffe2_HIP_INCLUDE})
|
||||
|
||||
|
|
|
|||
|
|
@ -1028,6 +1028,9 @@ if(USE_ROCM)
|
|||
list(APPEND HIP_HIPCC_FLAGS --offload-compress)
|
||||
if(WIN32)
|
||||
add_definitions(-DROCM_ON_WINDOWS)
|
||||
list(APPEND HIP_CXX_FLAGS -fms-extensions)
|
||||
# Suppress warnings about dllexport.
|
||||
list(APPEND HIP_CXX_FLAGS -Wno-ignored-attributes)
|
||||
endif()
|
||||
add_definitions(-DROCM_VERSION=${ROCM_VERSION_DEV_INT})
|
||||
add_definitions(-DTORCH_HIP_VERSION=${TORCH_HIP_VERSION})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user