Skip to content

Commit 4a3dabd

Browse files
authored
[RELEASE-ONLY CHANGES] Temp changes to build triton from pin for first RC (#135517)
[Release only] Temp changes to build triton from pin
1 parent e130696 commit 4a3dabd

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

.circleci/scripts/binary_populate_env.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64' a
7979
if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then
8080
# Only linux Python < 3.13 are supported wheels for triton
8181
TRITON_REQUIREMENT="triton==${TRITON_VERSION}; ${TRITON_CONSTRAINT}"
82-
if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then
82+
if [[ -n "$PYTORCH_BUILD_VERSION" ]]; then
8383
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt)
8484
TRITON_REQUIREMENT="pytorch-triton==${TRITON_VERSION}+${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}"
8585
fi
@@ -89,7 +89,7 @@ fi
8989
# Set triton via PYTORCH_EXTRA_INSTALL_REQUIREMENTS for triton rocm package
9090
if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*rocm.* && $(uname) == "Linux" ]]; then
9191
TRITON_REQUIREMENT="pytorch-triton-rocm==${TRITON_VERSION}; ${TRITON_CONSTRAINT}"
92-
if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then
92+
if [[ -n "$PYTORCH_BUILD_VERSION" ]]; then
9393
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt)
9494
TRITON_REQUIREMENT="pytorch-triton-rocm==${TRITON_VERSION}+${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}"
9595
fi
@@ -103,7 +103,7 @@ fi
103103
# Set triton via PYTORCH_EXTRA_INSTALL_REQUIREMENTS for triton xpu package
104104
if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*xpu.* && $(uname) == "Linux" ]]; then
105105
TRITON_REQUIREMENT="pytorch-triton-xpu==${TRITON_VERSION}; ${TRITON_CONSTRAINT}"
106-
if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then
106+
if [[ -n "$PYTORCH_BUILD_VERSION" ]]; then
107107
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-xpu.txt)
108108
TRITON_REQUIREMENT="pytorch-triton-xpu==${TRITON_VERSION}+${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}"
109109
fi

.github/workflows/build-triton-wheel.yml

+3-17
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ jobs:
6565
docker-image: ${{ env.DOCKER_IMAGE }}
6666

6767
- name: Build Triton wheel
68-
env:
69-
IS_RELEASE_TAG: ${{ startsWith(github.event.ref, 'refs/tags/v') }}
7068
run: |
7169
set -x
7270
mkdir -p "${RUNNER_TEMP}/artifacts/"
@@ -102,19 +100,14 @@ jobs:
102100
;;
103101
esac
104102
105-
RELEASE=""
106-
if [[ "${IS_RELEASE_TAG}" == true ]]; then
107-
RELEASE="--release"
108-
fi
109-
110103
docker exec -t "${container_name}" yum install -y zlib-devel zip
111104
docker exec -t "${container_name}" "${PYTHON_EXECUTABLE}" -m pip install -U setuptools==67.4.0
112105
# Triton xpu build use GCC11
113106
if [[ "${BUILD_DEVICE}" == xpu ]]; then
114107
docker exec -t "${container_name}" yum install -y devtoolset-11-gcc-c++
115-
docker exec -t "${container_name}" bash -c "source /opt/rh/devtoolset-11/enable && ${PYTHON_EXECUTABLE} /pytorch/.github/scripts/build_triton_wheel.py --device=$BUILD_DEVICE $RELEASE"
108+
docker exec -t "${container_name}" bash -c "source /opt/rh/devtoolset-11/enable && ${PYTHON_EXECUTABLE} /pytorch/.github/scripts/build_triton_wheel.py --device=$BUILD_DEVICE"
116109
else
117-
docker exec -t "${container_name}" bash -c "${PYTHON_EXECUTABLE} /pytorch/.github/scripts/build_triton_wheel.py --device=$BUILD_DEVICE $RELEASE"
110+
docker exec -t "${container_name}" bash -c "${PYTHON_EXECUTABLE} /pytorch/.github/scripts/build_triton_wheel.py --device=$BUILD_DEVICE"
118111
fi
119112
docker exec -t "${container_name}" chown -R 1000.1000 /artifacts
120113
@@ -228,8 +221,6 @@ jobs:
228221
docker-image: ${{ env.DOCKER_IMAGE }}
229222

230223
- name: Build Triton conda package
231-
env:
232-
IS_RELEASE_TAG: ${{ startsWith(github.event.ref, 'refs/tags/v') }}
233224
run: |
234225
set -x
235226
mkdir -p "${RUNNER_TEMP}/artifacts/"
@@ -242,13 +233,8 @@ jobs:
242233
"${DOCKER_IMAGE}" \
243234
)
244235
245-
RELEASE=""
246-
if [[ "${IS_RELEASE_TAG}" == true ]]; then
247-
RELEASE="--release"
248-
fi
249-
250236
docker exec -t "${container_name}" yum install -y llvm11 llvm11-devel llvm11-static llvm11-libs zlib-devel
251-
docker exec -t "${container_name}" python /pytorch/.github/scripts/build_triton_wheel.py --build-conda --py-version="${PY_VERS}" $RELEASE
237+
docker exec -t "${container_name}" python /pytorch/.github/scripts/build_triton_wheel.py --build-conda --py-version="${PY_VERS}"
252238
docker exec -t "${container_name}" chown -R 1000.1000 /artifacts
253239
254240
- uses: actions/[email protected]

0 commit comments

Comments
 (0)