Support all ROCm supported uarchs simultaneously: gfx803, gfx900, gfx906 (#17367)

Summary:
Correct misspelled flag.

Remove dependency on debug flag (HCC_AMDGPU_TARGET)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17367

Differential Revision: D14227334

Pulled By: bddppq

fbshipit-source-id: d838f219a9a1854330b0bc851c40dfbba77a32ef
This commit is contained in:
Johannes M Dieterich 2019-02-26 11:35:26 -08:00 committed by Facebook Github Bot
parent 5903522ad6
commit 1607bb322d
2 changed files with 5 additions and 5 deletions

View File

@ -811,8 +811,8 @@ if(USE_ROCM)
# Ask hcc to generate device code during compilation so we can use
# host linker to link.
list(APPEND HIP_HCC_FLAGS -fno-gpu-rdc)
foreach(hcc_amdgpu_target ${HCC_AMDGPU_TARGET})
list(APPEND HIP_HCC_FLAGS -amdgpu-target=${hcc_amdgpu_target})
foreach(pytorch_rocm_arch ${PYTORCH_ROCM_ARCH})
list(APPEND HIP_HCC_FLAGS --amdgpu-target=${pytorch_rocm_arch})
endforeach()
set(Caffe2_HIP_INCLUDE

View File

@ -94,10 +94,10 @@ ELSE()
SET(MIOPEN_PATH $ENV{MIOPEN_PATH})
ENDIF()
IF(NOT DEFINED ENV{HCC_AMDGPU_TARGET})
SET(HCC_AMDGPU_TARGET gfx900;gfx906)
IF(NOT DEFINED ENV{PYTORCH_ROCM_ARCH})
SET(PYTORCH_ROCM_ARCH gfx803;gfx900;gfx906)
ELSE()
SET(HCC_AMDGPU_TARGET $ENV{HCC_AMDGPU_TARGET})
SET(PYTORCH_ROCM_ARCH $ENV{PYTORCH_ROCM_ARCH})
ENDIF()
# Add HIP to the CMAKE Module Path