Skip to content

Commit 52f2493

Browse files
authored
rocm libtorch prebuild magma; fix manylinux cmake version (#1296)
1 parent da6dd4c commit 52f2493

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

libtorch/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ ENV PYTORCH_ROCM_ARCH ${PYTORCH_ROCM_ARCH}
6262
ENV MKLROOT /opt/intel
6363
ADD ./common/install_rocm.sh install_rocm.sh
6464
ADD ./common/install_rocm_drm.sh install_rocm_drm.sh
65-
ADD ./common/install_rocm_magma.sh install_rocm_magma.sh
65+
#ADD ./common/install_rocm_magma.sh install_rocm_magma.sh
6666
# gfortran and python needed for building magma from source for ROCm
6767
RUN apt-get update -y && \
6868
apt-get install gfortran -y && \
@@ -72,12 +72,12 @@ RUN apt-get update -y && \
7272
FROM rocm as rocm5.3
7373
RUN ROCM_VERSION=5.3 bash ./install_rocm.sh && rm install_rocm.sh
7474
RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh
75-
RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
75+
#RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
7676

7777
FROM rocm as rocm5.4.2
7878
RUN ROCM_VERSION=5.4.2 bash ./install_rocm.sh && rm install_rocm.sh
7979
RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh
80-
RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
80+
#RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
8181

8282
FROM ${BASE_TARGET} as final
8383
# Install LLVM

libtorch/build_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ case ${GPU_ARCH_TYPE} in
2727
rocm)
2828
BASE_TARGET=rocm${GPU_ARCH_VERSION}
2929
DOCKER_TAG=rocm${GPU_ARCH_VERSION}
30-
GPU_IMAGE=rocm/dev-ubuntu-20.04:${GPU_ARCH_VERSION}
30+
GPU_IMAGE=rocm/dev-ubuntu-20.04:${GPU_ARCH_VERSION}-magma
3131
PYTORCH_ROCM_ARCH="gfx900;gfx906;gfx908"
3232
ROCM_REGEX="([0-9]+)\.([0-9]+)[\.]?([0-9]*)"
3333
if [[ $GPU_ARCH_VERSION =~ $ROCM_REGEX ]]; then

manywheel/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,14 @@ ADD ./common/install_rocm.sh install_rocm.sh
160160
RUN ROCM_VERSION=${ROCM_VERSION} bash ./install_rocm.sh && rm install_rocm.sh
161161
ADD ./common/install_rocm_drm.sh install_rocm_drm.sh
162162
RUN bash ./install_rocm_drm.sh && rm install_rocm_drm.sh
163+
# cmake is already installed inside the rocm base image, but both 2 and 3 exist
164+
# cmake3 is needed for pytorch build, and formerly the MIOpen build
165+
RUN rpm -e cmake && \
166+
pip3 install cmake==3.18.4 && \
167+
ln -sf /usr/local/bin/cmake /usr/bin/cmake && \
168+
ln -sf /usr/local/bin/cmake /usr/bin/cmake3
163169
### The following is now performed beforehand in a new GPU_IMAGE with magma and miopen preinstalled
164170
#ADD ./common/install_rocm_magma.sh install_rocm_magma.sh
165171
#RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
166-
## cmake is already installed inside the rocm base image, but both 2 and 3 exist
167-
## cmake3 is needed for the later MIOpen custom build, so that step is last.
168-
#RUN rpm -e cmake && \
169-
# pip3 install cmake==3.18.4 && \
170-
# ln -sf /usr/local/bin/cmake /usr/bin/cmake && \
171-
# ln -sf /usr/local/bin/cmake /usr/bin/cmake3
172-
#
173172
#ADD ./common/install_miopen.sh install_miopen.sh
174173
#RUN bash ./install_miopen.sh ${ROCM_VERSION} && rm install_miopen.sh

0 commit comments

Comments
 (0)