Skip to content

Commit 597accf

Browse files
jataylofacebook-github-bot
authored andcommitted
Remove deprecated HIP flags (#360)
Summary: Removes the outdated HIP flags appended to HIP_CXX_FLAGS The will help remove the following warnings in the pytorch build log ``` [6238/6889] Building CXX object caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/cudnn/hip/Conv_v8.cpp.o cc1plus: warning: command line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++ cc1plus: warning: unrecognized command line option ‘-Wno-unused-command-line-argument’ cc1plus: warning: unrecognized command line option ‘-Wno-exceptions’ cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’ cc1plus: warning: unrecognized command line option ‘-Wno-macro-redefined’ ``` (There is a similar change also required in `pytorch/cmake/Dependencies.cmake` to fully remove these warnings) This PR also replaces the deprecated `--amdgpu-target` hip flag with `--offload-arch` as previously updated in pytorch https://github.com/pytorch/pytorch/pull/97620/files cc: pruthvistony Pull Request resolved: #360 Reviewed By: zou3519 Differential Revision: D46023158 Pulled By: malfet fbshipit-source-id: 1444a6ccae27f008a8ca7f5dd95df026c15b48dc
1 parent 31b1f02 commit 597accf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmake/Dependencies.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,8 @@ if(USE_ROCM)
146146
list(APPEND HIP_CXX_FLAGS -D__HIP_NO_HALF_OPERATORS__=1)
147147
list(APPEND HIP_CXX_FLAGS -D__HIP_NO_HALF_CONVERSIONS__=1)
148148
list(APPEND HIP_CXX_FLAGS -DHIP_VERSION=${HIP_VERSION_MAJOR})
149-
list(APPEND HIP_CXX_FLAGS -Wno-macro-redefined)
150-
list(APPEND HIP_CXX_FLAGS -Wno-inconsistent-missing-override)
151-
list(APPEND HIP_CXX_FLAGS -Wno-exceptions)
152149
list(APPEND HIP_CXX_FLAGS -Wno-shift-count-negative)
153150
list(APPEND HIP_CXX_FLAGS -Wno-shift-count-overflow)
154-
list(APPEND HIP_CXX_FLAGS -Wno-unused-command-line-argument)
155151
list(APPEND HIP_CXX_FLAGS -Wno-duplicate-decl-specifier)
156152
list(APPEND HIP_CXX_FLAGS -DUSE_MIOPEN)
157153

@@ -161,7 +157,7 @@ if(USE_ROCM)
161157
list(APPEND HIP_CLANG_FLAGS -fno-gpu-rdc)
162158
list(APPEND HIP_CLANG_FLAGS -Wno-defaulted-function-deleted)
163159
foreach(gloo_rocm_arch ${GLOO_ROCM_ARCH})
164-
list(APPEND HIP_CLANG_FLAGS --amdgpu-target=${gloo_rocm_arch})
160+
list(APPEND HIP_CLANG_FLAGS --offload-arch=${gloo_rocm_arch})
165161
endforeach()
166162

167163
set(GLOO_HIP_INCLUDE ${hip_INCLUDE_DIRS} $<BUILD_INTERFACE:${HIPIFY_OUTPUT_ROOT_DIR}> $<INSTALL_INTERFACE:include> ${GLOO_HIP_INCLUDE})

0 commit comments

Comments
 (0)