From c06d2bea263c81f0c772cf3f3ec9f69702ee1412 Mon Sep 17 00:00:00 2001 From: Ethan Wee Date: Mon, 18 Aug 2025 07:27:44 -0700 Subject: [PATCH 1/8] Update Dockerfile_2_28 --- manywheel/Dockerfile_2_28 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index dc3e3eaa3..c2e716dcf 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -91,10 +91,10 @@ RUN yum install -y \ gcc-toolset-${DEVTOOLSET_VERSION}-toolchain \ glibc-langpack-en -# ius-release package needs epel-release-7 -RUN yum install -y \ - https://repo.ius.io/ius-release-el7.rpm \ - https://ossci-linux.s3.amazonaws.com/epel-release-7-14.noarch.rpm +RUN dnf -y module reset git && \ + dnf -y module enable git:2.39 && \ + dnf -y install git && dnf clean all +RUN git config --global --add safe.directory "*" #Stopped working as of 8/1 (due to CentOS EOL?) # https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm RUN yum swap -y git git236-core From ead82884e52cb8b56deb2593d57a4802f493ba37 Mon Sep 17 00:00:00 2001 From: ethanwee1 Date: Mon, 18 Aug 2025 14:44:21 +0000 Subject: [PATCH 2/8] XRevert "Update Dockerfile_2_28" This reverts commit c06d2bea263c81f0c772cf3f3ec9f69702ee1412. --- manywheel/Dockerfile_2_28 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index c2e716dcf..dc3e3eaa3 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -91,10 +91,10 @@ RUN yum install -y \ gcc-toolset-${DEVTOOLSET_VERSION}-toolchain \ glibc-langpack-en -RUN dnf -y module reset git && \ - dnf -y module enable git:2.39 && \ - dnf -y install git && dnf clean all -RUN git config --global --add safe.directory "*" +# ius-release package needs epel-release-7 +RUN yum install -y \ + https://repo.ius.io/ius-release-el7.rpm \ + https://ossci-linux.s3.amazonaws.com/epel-release-7-14.noarch.rpm #Stopped working as of 8/1 (due to CentOS EOL?) # https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm RUN yum swap -y git git236-core From ae90c97a2751f49288963112bc136061c2ea48a5 Mon Sep 17 00:00:00 2001 From: ethanwee1 Date: Mon, 18 Aug 2025 14:48:13 +0000 Subject: [PATCH 3/8] upgrade to gcc13 --- manywheel/Dockerfile_2_28 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index dc3e3eaa3..69226eb1e 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -7,8 +7,8 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -ARG DEVTOOLSET_VERSION=11 -RUN yum install -y wget curl perl util-linux xz bzip2 git patch which perl zlib-devel yum-utils gcc-toolset-${DEVTOOLSET_VERSION}-toolchain +ARG DEVTOOLSET_VERSION=13 +RUN yum install -y sudo wget curl perl util-linux xz bzip2 git patch which perl zlib-devel yum-utils gcc-toolset-${DEVTOOLSET_VERSION}-gcc gcc-toolset-${DEVTOOLSET_VERSION}-gcc-c++ gcc-toolset-${DEVTOOLSET_VERSION}-gcc-gfortran gcc-toolset-${DEVTOOLSET_VERSION}-gdb ENV PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH # Install setuptools and wheel for python 3.12/3.13 @@ -65,7 +65,7 @@ ADD ./common/install_libpng.sh install_libpng.sh RUN bash ./install_libpng.sh && rm install_libpng.sh FROM ${GPU_IMAGE} as common -ARG DEVTOOLSET_VERSION=11 +ARG DEVTOOLSET_VERSION=13 ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 @@ -88,13 +88,11 @@ RUN yum install -y \ wget \ which \ xz \ - gcc-toolset-${DEVTOOLSET_VERSION}-toolchain \ - glibc-langpack-en - -# ius-release package needs epel-release-7 -RUN yum install -y \ - https://repo.ius.io/ius-release-el7.rpm \ - https://ossci-linux.s3.amazonaws.com/epel-release-7-14.noarch.rpm + glibc-langpack-en \ + gcc-toolset-${DEVTOOLSET_VERSION}-gcc \ + gcc-toolset-${DEVTOOLSET_VERSION}-gcc-c++ \ + gcc-toolset-${DEVTOOLSET_VERSION}-gcc-gfortran \ + gcc-toolset-${DEVTOOLSET_VERSION}-gdb #Stopped working as of 8/1 (due to CentOS EOL?) # https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm RUN yum swap -y git git236-core @@ -122,7 +120,7 @@ COPY --from=jni /usr/local/include/jni.h /usr/local/ FROM common as cpu_final ARG BASE_CUDA_VERSION=11.8 -ARG DEVTOOLSET_VERSION=11 +ARG DEVTOOLSET_VERSION=13 # Install Anaconda ADD ./common/install_conda_docker.sh install_conda.sh RUN bash ./install_conda.sh && rm install_conda.sh From 2aba8bea49ccbda657753bdfe2d5b15a26f7da1b Mon Sep 17 00:00:00 2001 From: Ethan Wee Date: Mon, 18 Aug 2025 07:52:42 -0700 Subject: [PATCH 4/8] Update Dockerfile_2_28 --- manywheel/Dockerfile_2_28 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/Dockerfile_2_28 b/manywheel/Dockerfile_2_28 index 69226eb1e..f1a70d101 100644 --- a/manywheel/Dockerfile_2_28 +++ b/manywheel/Dockerfile_2_28 @@ -95,7 +95,7 @@ RUN yum install -y \ gcc-toolset-${DEVTOOLSET_VERSION}-gdb #Stopped working as of 8/1 (due to CentOS EOL?) # https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum swap -y git git236-core + # git236+ would refuse to run git commands in repos owned by other users # Which causes version check to fail, as pytorch repo is bind-mounted into the image # Override this behaviour by treating every folder as safe From 06e512696139dac926d0193f9951c033ff3ce9b7 Mon Sep 17 00:00:00 2001 From: ethanwee1 Date: Mon, 18 Aug 2025 17:25:39 +0000 Subject: [PATCH 5/8] Revert "[main] Conditionalize triton package name on rocm version (#91)" This reverts commit 66b8d8dc30c17e671cdaa3677b2aafbf9ee9fef3. --- manywheel/build_rocm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index 0c9e0b819..dc84b4832 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -359,7 +359,7 @@ if [ ${PYTORCH_VERSION%%\.*} -ge 2 ]; then TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'$(if [[ $(ver "$PYTORCH_VERSION") -le $(ver "2.5") ]]; then echo " and python_version < '3.13'"; fi)" # Use "triton" for dev builds, else "pytorch-triton-rocm" # Temp: Currently enabling for rocm7.1_internal_testing branch only but plan to expand it to other branches - if [[ $ROCM_INT -gt 70000 ]]; then + if [[ "$PYTORCH_VERSION_FULL" == *"2.9.0a0"* ]]; then PKG="triton" else PKG="pytorch-triton-rocm" From 57822f586950902e123a9df0b32435d60640c972 Mon Sep 17 00:00:00 2001 From: ethanwee1 Date: Mon, 18 Aug 2025 17:25:45 +0000 Subject: [PATCH 6/8] Revert "[main] remove pytorch-triton-rocm (#90)" This reverts commit a6ac118ebcd245e01f19376dde8b6e666d0d1135. --- manywheel/build_rocm.sh | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index dc84b4832..13de66170 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -75,7 +75,7 @@ ROCM_VERSION_WITH_PATCH=rocm${ROCM_VERSION_MAJOR}.${ROCM_VERSION_MINOR}.${ROCM_V ROCM_INT=$(($ROCM_VERSION_MAJOR * 10000 + $ROCM_VERSION_MINOR * 100 + $ROCM_VERSION_PATCH)) PYTORCH_VERSION=$(cat $PYTORCH_ROOT/version.txt | grep -oP "[0-9]+\.[0-9]+\.[0-9]+") -PYTORCH_VERSION_FULL=$(cat "$PYTORCH_ROOT/version.txt") + do_lightweight_build() { echo "=== Building LIGHTWEIGHT variant ===" @@ -348,34 +348,25 @@ ver() { # Assuming PYTORCH_VERSION=x.y.z, if x >= 2 if [ ${PYTORCH_VERSION%%\.*} -ge 2 ]; then if [[ $(uname) == "Linux" ]] && [[ "$DESIRED_PYTHON" != "3.12" || $(ver $PYTORCH_VERSION) -ge $(ver 2.4) ]]; then - # Triton commit got unified in PyTorch 2.5 - if [[ $(ver $PYTORCH_VERSION) -ge $(ver 2.5) ]]; then + # Triton commit got unified in PyTorch 2.5 + if [[ $(ver $PYTORCH_VERSION) -ge $(ver 2.5) ]]; then TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt) - else + else TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-rocm.txt) - fi + fi TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt) - # Only linux Python < 3.13 are supported wheels for triton - TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'$(if [[ $(ver "$PYTORCH_VERSION") -le $(ver "2.5") ]]; then echo " and python_version < '3.13'"; fi)" - # Use "triton" for dev builds, else "pytorch-triton-rocm" - # Temp: Currently enabling for rocm7.1_internal_testing branch only but plan to expand it to other branches - if [[ "$PYTORCH_VERSION_FULL" == *"2.9.0a0"* ]]; then - PKG="triton" - else - PKG="pytorch-triton-rocm" - fi - - REQ="${PKG}==${TRITON_VERSION}+${ROCM_VERSION_WITH_PATCH}.git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" - - if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${REQ}" + # Only linux Python < 3.13 are supported wheels for triton + TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'$(if [[ $(ver "$PYTORCH_VERSION") -le $(ver "2.5") ]]; then echo " and python_version < '3.13'"; fi)" + + if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then + export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="pytorch-triton-rocm==${TRITON_VERSION}+${ROCM_VERSION_WITH_PATCH}.git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" else - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${REQ}" + export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | pytorch-triton-rocm==${TRITON_VERSION}+${ROCM_VERSION_WITH_PATCH}.git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" fi - unset PKG REQ fi fi + echo "PYTORCH_ROCM_ARCH: ${PYTORCH_ROCM_ARCH}" export LIGHTWEIGHT_WHEELNAME_MARKER="${LIGHTWEIGHT_WHEELNAME_MARKER}" From d42218139ad05ded860dcdf1788052bdfa37962a Mon Sep 17 00:00:00 2001 From: ethanwee1 Date: Mon, 18 Aug 2025 17:27:29 +0000 Subject: [PATCH 7/8] Revert "Revert "[main] remove pytorch-triton-rocm (#90)"" This reverts commit 57822f586950902e123a9df0b32435d60640c972. --- manywheel/build_rocm.sh | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index 13de66170..dc84b4832 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -75,7 +75,7 @@ ROCM_VERSION_WITH_PATCH=rocm${ROCM_VERSION_MAJOR}.${ROCM_VERSION_MINOR}.${ROCM_V ROCM_INT=$(($ROCM_VERSION_MAJOR * 10000 + $ROCM_VERSION_MINOR * 100 + $ROCM_VERSION_PATCH)) PYTORCH_VERSION=$(cat $PYTORCH_ROOT/version.txt | grep -oP "[0-9]+\.[0-9]+\.[0-9]+") - +PYTORCH_VERSION_FULL=$(cat "$PYTORCH_ROOT/version.txt") do_lightweight_build() { echo "=== Building LIGHTWEIGHT variant ===" @@ -348,25 +348,34 @@ ver() { # Assuming PYTORCH_VERSION=x.y.z, if x >= 2 if [ ${PYTORCH_VERSION%%\.*} -ge 2 ]; then if [[ $(uname) == "Linux" ]] && [[ "$DESIRED_PYTHON" != "3.12" || $(ver $PYTORCH_VERSION) -ge $(ver 2.4) ]]; then - # Triton commit got unified in PyTorch 2.5 - if [[ $(ver $PYTORCH_VERSION) -ge $(ver 2.5) ]]; then + # Triton commit got unified in PyTorch 2.5 + if [[ $(ver $PYTORCH_VERSION) -ge $(ver 2.5) ]]; then TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt) - else + else TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-rocm.txt) - fi + fi TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt) - # Only linux Python < 3.13 are supported wheels for triton - TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'$(if [[ $(ver "$PYTORCH_VERSION") -le $(ver "2.5") ]]; then echo " and python_version < '3.13'"; fi)" - - if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="pytorch-triton-rocm==${TRITON_VERSION}+${ROCM_VERSION_WITH_PATCH}.git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" + # Only linux Python < 3.13 are supported wheels for triton + TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'$(if [[ $(ver "$PYTORCH_VERSION") -le $(ver "2.5") ]]; then echo " and python_version < '3.13'"; fi)" + # Use "triton" for dev builds, else "pytorch-triton-rocm" + # Temp: Currently enabling for rocm7.1_internal_testing branch only but plan to expand it to other branches + if [[ "$PYTORCH_VERSION_FULL" == *"2.9.0a0"* ]]; then + PKG="triton" else - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | pytorch-triton-rocm==${TRITON_VERSION}+${ROCM_VERSION_WITH_PATCH}.git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" + PKG="pytorch-triton-rocm" fi + + REQ="${PKG}==${TRITON_VERSION}+${ROCM_VERSION_WITH_PATCH}.git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" + + if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then + export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${REQ}" + else + export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${REQ}" + fi + unset PKG REQ fi fi - echo "PYTORCH_ROCM_ARCH: ${PYTORCH_ROCM_ARCH}" export LIGHTWEIGHT_WHEELNAME_MARKER="${LIGHTWEIGHT_WHEELNAME_MARKER}" From 4423b48f01a28ede3fc4e5bb2437d68b25c4c8e4 Mon Sep 17 00:00:00 2001 From: ethanwee1 Date: Mon, 18 Aug 2025 17:27:39 +0000 Subject: [PATCH 8/8] Revert "Revert "[main] Conditionalize triton package name on rocm version (#91)"" This reverts commit 06e512696139dac926d0193f9951c033ff3ce9b7. --- manywheel/build_rocm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index dc84b4832..0c9e0b819 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -359,7 +359,7 @@ if [ ${PYTORCH_VERSION%%\.*} -ge 2 ]; then TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'$(if [[ $(ver "$PYTORCH_VERSION") -le $(ver "2.5") ]]; then echo " and python_version < '3.13'"; fi)" # Use "triton" for dev builds, else "pytorch-triton-rocm" # Temp: Currently enabling for rocm7.1_internal_testing branch only but plan to expand it to other branches - if [[ "$PYTORCH_VERSION_FULL" == *"2.9.0a0"* ]]; then + if [[ $ROCM_INT -gt 70000 ]]; then PKG="triton" else PKG="pytorch-triton-rocm"