Skip to content

Commit 63cb272

Browse files
Add ROCM_PATH env var to Dockerfile for ROCm5.7 issue with finding HIP (#1572)
1 parent d41bcbf commit 63cb272

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libtorch/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ FROM cpu as rocm
5959
ARG PYTORCH_ROCM_ARCH
6060
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
6161
ENV MKLROOT /opt/intel
62+
# Adding ROCM_PATH env var so that LoadHip.cmake (even with logic updated for ROCm6.0)
63+
# find HIP works for ROCm5.7. Not needed for ROCm6.0 and above.
64+
# Remove below when ROCm5.7 is not in support matrix anymore.
65+
ENV ROCM_PATH /opt/rocm
6266
# No need to install ROCm as base docker image should have full ROCm install
6367
#ADD ./common/install_rocm.sh install_rocm.sh
6468
ADD ./common/install_rocm_drm.sh install_rocm_drm.sh

manywheel/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ FROM cpu_final as rocm_final
159159
ARG ROCM_VERSION=3.7
160160
ARG PYTORCH_ROCM_ARCH
161161
ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
162+
# Adding ROCM_PATH env var so that LoadHip.cmake (even with logic updated for ROCm6.0)
163+
# find HIP works for ROCm5.7. Not needed for ROCm6.0 and above.
164+
# Remove below when ROCm5.7 is not in support matrix anymore.
165+
ENV ROCM_PATH /opt/rocm
162166
# No need to install ROCm as base docker image should have full ROCm install
163167
#ADD ./common/install_rocm.sh install_rocm.sh
164168
#RUN ROCM_VERSION=${ROCM_VERSION} bash ./install_rocm.sh && rm install_rocm.sh

0 commit comments

Comments
 (0)