Skip to content

Commit b9d2b93

Browse files
Update builder images to ROCm6.0 (#1647)
* Update ROCm versions for docker images * Don't build MIOpen from source for ROCm6.0 * Temporarily use magma fork with ROCm6.0 patch * Update ROCm versions for docker images * Add gfx942 * Update MIOpen repo * Magma PR 42 is merged, so use upstream repo master branch now * gfx942 target only fully supported for ROCm6.0 and above
1 parent 524a027 commit b9d2b93

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
runs-on: linux.12xlarge
5353
strategy:
5454
matrix:
55-
rocm_version: ["5.6", "5.7"]
55+
rocm_version: ["5.7", "6.0"]
5656
env:
5757
GPU_ARCH_TYPE: rocm
5858
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
@@ -58,7 +58,7 @@ jobs:
5858
runs-on: linux.12xlarge
5959
strategy:
6060
matrix:
61-
rocm_version: ["5.6", "5.7"]
61+
rocm_version: ["5.7", "6.0"]
6262
env:
6363
GPU_ARCH_TYPE: rocm
6464
GPU_ARCH_VERSION: ${{ matrix.rocm_version }}

common/install_miopen.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ MIOPEN_CMAKE_COMMON_FLAGS="
5656
-DMIOPEN_BUILD_DRIVER=OFF
5757
"
5858
# Pull MIOpen repo and set DMIOPEN_EMBED_DB based on ROCm version
59-
if [[ $ROCM_INT -ge 50700 ]] && [[ $ROCM_INT -lt 50800 ]]; then
59+
if [[ $ROCM_INT -ge 60000 ]] && [[ $ROCM_INT -lt 60100 ]]; then
60+
echo "ROCm 6.0 MIOpen does not need any patches, do not build from source"
61+
exit 0
62+
elif [[ $ROCM_INT -ge 50700 ]] && [[ $ROCM_INT -lt 60000 ]]; then
6063
echo "ROCm 5.7 MIOpen does not need any patches, do not build from source"
6164
exit 0
6265
elif [[ $ROCM_INT -ge 50600 ]] && [[ $ROCM_INT -lt 50700 ]]; then
@@ -85,7 +88,7 @@ fi
8588

8689
yum remove -y miopen-hip
8790

88-
git clone https://github.com/ROCmSoftwarePlatform/MIOpen -b ${MIOPEN_BRANCH}
91+
git clone https://github.com/ROCm/MIOpen -b ${MIOPEN_BRANCH}
8992
pushd MIOpen
9093
# remove .git to save disk space since CI runner was running out
9194
rm -rf .git

common/install_rocm_magma.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pushd magma
1515
if [[ $PYTORCH_BRANCH == "release/1.10.1" ]]; then
1616
git checkout magma_ctrl_launch_bounds
1717
else
18-
git checkout 28592a7170e4b3707ed92644bf4a689ed600c27f
18+
git checkout a1625ff4d9bc362906bd01f805dbbe12612953f6
1919
fi
2020
cp make.inc-examples/make.inc.hip-gcc-mkl make.inc
2121
echo 'LIBDIR += -L$(MKLROOT)/lib' >> make.inc

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 12.1 11.8; 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.6 5.7; do
11+
for rocm_version in 5.7 6.0; do
1212
GPU_ARCH_TYPE=rocm GPU_ARCH_VERSION="${rocm_version}" "${TOPDIR}/libtorch/build_docker.sh"
1313
done

libtorch/build_docker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ case ${GPU_ARCH_TYPE} in
3636
echo "ERROR: rocm regex failed"
3737
exit 1
3838
fi
39+
if [[ $ROCM_VERSION_INT -ge 60000 ]]; then
40+
PYTORCH_ROCM_ARCH+=";gfx942"
41+
fi
3942
DOCKER_GPU_BUILD_ARG="--build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH}"
4043
;;
4144
*)

manywheel/build_all_docker.sh

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

19-
for rocm_version in 5.6 5.7; do
19+
for rocm_version in 5.7 6.0; do
2020
GPU_ARCH_TYPE=rocm GPU_ARCH_VERSION="${rocm_version}" "${TOPDIR}/manywheel/build_docker.sh"
2121
MANYLINUX_VERSION=2014 GPU_ARCH_TYPE=rocm GPU_ARCH_VERSION="${rocm_version}" "${TOPDIR}/manywheel/build_docker.sh"
2222
done

manywheel/build_docker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ case ${GPU_ARCH_TYPE} in
5757
echo "ERROR: rocm regex failed"
5858
exit 1
5959
fi
60+
if [[ $ROCM_VERSION_INT -ge 60000 ]]; then
61+
PYTORCH_ROCM_ARCH+=";gfx942"
62+
fi
6063
DOCKER_GPU_BUILD_ARG="--build-arg ROCM_VERSION=${GPU_ARCH_VERSION} --build-arg PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH} --build-arg DEVTOOLSET_VERSION=9"
6164
;;
6265
*)

0 commit comments

Comments
 (0)