From 0306c40d5e0f543bd1f2d6935457218304eec1ba Mon Sep 17 00:00:00 2001 From: Jack Taylor <108682042+jataylo@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:22:17 +0000 Subject: [PATCH] [ROCm] Look for triton.txt for triton commit after release/2.5 --- manywheel/build_rocm.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index 4e513957f..94adb6fd4 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -234,7 +234,16 @@ fi # No triton dependency for now on 3.12 since we don't have binaries for it # and torch.compile doesn't work. if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then - TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-rocm.txt) + + # As of release 2.5 we have dropped triton-rocm.txt, this code should ensure builder is backwards compatible + TRITON_PIN_FILE="triton-rocm.txt" + TRITON_PIN_ROOT="$PYTORCH_ROOT/.ci/docker/ci_commit_pins" + + if [ -e "$TRITON_PIN_ROOT/$TRITON_PIN_FILE" ]; then + TRITON_SHORTHASH=$(cut -c1-10 $TRITON_PIN_ROOT/$TRITON_PIN_FILE) + else + TRITON_SHORTHASH=$(cut -c1-10 $TRITON_PIN_ROOT/triton.txt) + TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt) if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then