Skip to content

Commit 9a931c5

Browse files
authored
Upgrade nightly wheels to rocm5.4.2 (#1225)
* Upgrade nightly wheels to rocm5.4 * Adding graphic architectures for ROCm 5.4 * Updated to use ROCm5.4.1 * Updated to use ROCm5.4.2 * Fixed syntax error * Perform build on image with magma and miopen preinstalled
1 parent 177ba26 commit 9a931c5

File tree

8 files changed

+25
-21
lines changed

8 files changed

+25
-21
lines changed

.github/workflows/build-libtorch-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-18.04
4848
strategy:
4949
matrix:
50-
rocm_version: ["5.2", "5.3"]
50+
rocm_version: ["5.3", "5.4.2"]
5151
env:
5252
GPU_ARCH_TYPE: rocm
5353
GPU_ARCH_VERSION: ${{ matrix.rocm_version }}

.github/workflows/build-manywheel-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-18.04
5050
strategy:
5151
matrix:
52-
rocm_version: ["5.2", "5.3"]
52+
rocm_version: ["5.3", "5.4.2"]
5353
env:
5454
GPU_ARCH_TYPE: rocm
5555
GPU_ARCH_VERSION: ${{ matrix.rocm_version }}

common/install_miopen.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ MIOPEN_CMAKE_COMMON_FLAGS="
6060
-DMIOPEN_BUILD_DRIVER=OFF
6161
"
6262
# Pull MIOpen repo and set DMIOPEN_EMBED_DB based on ROCm version
63-
if [[ $ROCM_INT -ge 50300 ]] && [[ $ROCM_INT -lt 50400 ]]; then
63+
if [[ $ROCM_INT -ge 50400 ]] && [[ $ROCM_INT -lt 50500 ]]; then
64+
MIOPEN_CMAKE_DB_FLAGS="-DMIOPEN_EMBED_DB=gfx900_56;gfx906_60;gfx90878;gfx90a6e;gfx1030_36 -DMIOPEN_USE_MLIR=Off"
65+
MIOPEN_BRANCH="release/rocm-rel-5.4-staging"
66+
elif [[ $ROCM_INT -ge 50300 ]] && [[ $ROCM_INT -lt 50400 ]]; then
6467
MIOPEN_CMAKE_DB_FLAGS="-DMIOPEN_EMBED_DB=gfx900_56;gfx906_60;gfx90878;gfx90a6e;gfx1030_36 -DMIOPEN_USE_MLIR=Off"
6568
MIOPEN_BRANCH="release/rocm-rel-5.3-staging"
6669
elif [[ $ROCM_INT -ge 50200 ]] && [[ $ROCM_INT -lt 50300 ]]; then

libtorch/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ RUN apt-get update -y && \
6969
apt-get install python -y && \
7070
apt-get clean
7171

72-
FROM rocm as rocm5.2
73-
RUN ROCM_VERSION=5.2 bash ./install_rocm.sh && rm install_rocm.sh
72+
FROM rocm as rocm5.3
73+
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
7575
RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
7676

77-
FROM rocm as rocm5.3
78-
RUN ROCM_VERSION=5.3 bash ./install_rocm.sh && rm install_rocm.sh
77+
FROM rocm as rocm5.4.2
78+
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
8080
RUN bash ./install_rocm_magma.sh && rm install_rocm_magma.sh
8181

libtorch/build_all_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ for cuda_version in 11.8 11.7 11.6; do
88
GPU_ARCH_TYPE=cuda GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/libtorch/build_docker.sh"
99
done
1010

11-
for rocm_version in 5.2 5.3; do
11+
for rocm_version in 5.3 5.4.2; do
1212
GPU_ARCH_TYPE=rocm GPU_ARCH_VERSION="${rocm_version}" "${TOPDIR}/libtorch/build_docker.sh"
1313
done

manywheel/Dockerfile

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

manywheel/build_all_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ for cuda_version in 11.7 11.6; do
1414
MANYLINUX_VERSION=2014 GPU_ARCH_TYPE=cuda GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/manywheel/build_docker.sh"
1515
done
1616

17-
for rocm_version in 5.2 5.3; do
17+
for rocm_version in 5.3 5.4.2; do
1818
GPU_ARCH_TYPE=rocm GPU_ARCH_VERSION="${rocm_version}" "${TOPDIR}/manywheel/build_docker.sh"
1919
MANYLINUX_VERSION=2014 GPU_ARCH_TYPE=rocm GPU_ARCH_VERSION="${rocm_version}" "${TOPDIR}/manywheel/build_docker.sh"
2020
done

manywheel/build_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ case ${GPU_ARCH_TYPE} in
4444
TARGET=rocm_final
4545
DOCKER_TAG=rocm${GPU_ARCH_VERSION}
4646
LEGACY_DOCKER_IMAGE=${DOCKER_REGISTRY}/pytorch/manylinux-rocm:${GPU_ARCH_VERSION}
47-
GPU_IMAGE=rocm/dev-centos-7:${GPU_ARCH_VERSION}
47+
GPU_IMAGE=rocm/dev-centos-7:${GPU_ARCH_VERSION}-magma-miopen-staging
4848
PYTORCH_ROCM_ARCH="gfx900;gfx906;gfx908"
4949
ROCM_REGEX="([0-9]+)\.([0-9]+)[\.]?([0-9]*)"
5050
if [[ $GPU_ARCH_VERSION =~ $ROCM_REGEX ]]; then

0 commit comments

Comments
 (0)