diff --git a/manywheel/build_cuda.sh b/manywheel/build_cuda.sh index 3bc3a49f9..8af346e85 100644 --- a/manywheel/build_cuda.sh +++ b/manywheel/build_cuda.sh @@ -272,9 +272,14 @@ else fi # TODO: Remove me when Triton has a proper release channel -if [[ $(uname) == "Linux" && -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then +if [[ $(uname) == "Linux" ]]; then TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.github/ci_commit_pins/triton.txt) - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="pytorch-triton==2.1.0+${TRITON_SHORTHASH}" + + if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then + export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="pytorch-triton==2.1.0+${TRITON_SHORTHASH}" + else + export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | pytorch-triton==2.1.0+${TRITON_SHORTHASH}" + fi fi # builder/test.sh requires DESIRED_CUDA to know what tests to exclude