Skip to content

Commit

Permalink
[ROCm] remove use of HIP_PLATFORM (pytorch#47241)
Browse files Browse the repository at this point in the history
Summary:
Fixes deprecated use of the HIP_PLATFORM env var.  This env var is no longer needed to be set explicitly.  Instead, HIP_PLATFORM is automatically detected by hipcc.

Pull Request resolved: pytorch#47241

Reviewed By: mruberry

Differential Revision: D24699982

Pulled By: ngimel

fbshipit-source-id: 9cd2f32e7c0c8d662832b0cbbc2988835a45961a
  • Loading branch information
jeffdaily authored and facebook-github-bot committed Nov 3, 2020
1 parent 579cfc6 commit 9e58c85
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion .circleci/docker/centos-rocm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ ENV PATH /opt/rocm/hcc/bin:$PATH
ENV PATH /opt/rocm/hip/bin:$PATH
ENV PATH /opt/rocm/opencl/bin:$PATH
ENV PATH /opt/rocm/llvm/bin:$PATH
ENV HIP_PLATFORM hcc
ENV LANG en_US.utf8
ENV LC_ALL en_US.utf8

Expand Down
1 change: 0 additions & 1 deletion .circleci/docker/ubuntu-rocm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ ENV PATH /opt/rocm/hcc/bin:$PATH
ENV PATH /opt/rocm/hip/bin:$PATH
ENV PATH /opt/rocm/opencl/bin:$PATH
ENV PATH /opt/rocm/llvm/bin:$PATH
ENV HIP_PLATFORM hcc
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

Expand Down
2 changes: 2 additions & 0 deletions .jenkins/caffe2/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if [[ "${BUILD_ENVIRONMENT}" =~ py((2|3)\.?[0-9]?\.?[0-9]?) ]]; then
fi
if [[ "${BUILD_ENVIRONMENT}" == *rocm* ]]; then
# HIP_PLATFORM is auto-detected by hipcc; unset to avoid build errors
unset HIP_PLATFORM
if which sccache > /dev/null; then
# Save sccache logs to file
sccache --stop-server || true
Expand Down
2 changes: 2 additions & 0 deletions .jenkins/pytorch/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ SCRIPT_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

# Figure out which Python to use for ROCm
if [[ "${BUILD_ENVIRONMENT}" == *rocm* ]] && [[ "${BUILD_ENVIRONMENT}" =~ py((2|3)\.?[0-9]?\.?[0-9]?) ]]; then
# HIP_PLATFORM is auto-detected by hipcc; unset to avoid build errors
unset HIP_PLATFORM
PYTHON=$(which "python${BASH_REMATCH[1]}")
# non-interactive bashs do not expand aliases by default
shopt -s expand_aliases
Expand Down
1 change: 0 additions & 1 deletion docker/caffe2/jenkins/centos-rocm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ENV PATH /opt/rocm/bin:$PATH
ENV PATH /opt/rocm/hcc/bin:$PATH
ENV PATH /opt/rocm/hip/bin:$PATH
ENV PATH /opt/rocm/opencl/bin:$PATH
ENV HIP_PLATFORM hcc
ENV LC_ALL en_US.utf8
ENV LANG en_US.utf8

Expand Down
1 change: 0 additions & 1 deletion docker/caffe2/jenkins/ubuntu-rocm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ ENV PATH /opt/rocm/bin:$PATH
ENV PATH /opt/rocm/hcc/bin:$PATH
ENV PATH /opt/rocm/hip/bin:$PATH
ENV PATH /opt/rocm/opencl/bin:$PATH
ENV HIP_PLATFORM hcc
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

Expand Down

0 comments on commit 9e58c85

Please sign in to comment.