From 06b03073b5fe2fb26260323a69a9d5ab23bbc9cd Mon Sep 17 00:00:00 2001 From: atalman Date: Tue, 9 Dec 2025 20:57:29 +0000 Subject: [PATCH] Rename pytorch-triton package to triton (#169888) Fixes https://github.com/pytorch/pytorch/issues/163963 Makes naming more consistent with official triton release Pull Request resolved: https://github.com/pytorch/pytorch/pull/169888 Approved by: https://github.com/malfet, https://github.com/njriasan --- .circleci/scripts/binary_populate_env.sh | 10 +++++----- .github/scripts/build_triton_wheel.py | 6 +++--- .github/workflows/build-triton-wheel.yml | 6 +++--- RELEASE.md | 10 +++++----- scripts/install_triton_wheel.sh | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.circleci/scripts/binary_populate_env.sh b/.circleci/scripts/binary_populate_env.sh index 11f96785799..74ad225db93 100755 --- a/.circleci/scripts/binary_populate_env.sh +++ b/.circleci/scripts/binary_populate_env.sh @@ -77,17 +77,17 @@ if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS: TRITON_REQUIREMENT="triton==${TRITON_VERSION}; ${TRITON_CONSTRAINT}" if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt) - TRITON_REQUIREMENT="pytorch-triton==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" + TRITON_REQUIREMENT="triton==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" fi export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT}" fi # Set triton via PYTORCH_EXTRA_INSTALL_REQUIREMENTS for triton rocm package if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*rocm.* && $(uname) == "Linux" ]]; then - TRITON_REQUIREMENT="pytorch-triton-rocm==${TRITON_VERSION}; ${TRITON_CONSTRAINT}" + TRITON_REQUIREMENT="triton-rocm==${TRITON_VERSION}; ${TRITON_CONSTRAINT}" if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt) - TRITON_REQUIREMENT="pytorch-triton-rocm==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" + TRITON_REQUIREMENT="triton-rocm==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" fi if [[ -z "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${TRITON_REQUIREMENT}" @@ -99,10 +99,10 @@ fi # Set triton via PYTORCH_EXTRA_INSTALL_REQUIREMENTS for triton xpu package if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*xpu.* ]]; then TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_xpu_version.txt) - TRITON_REQUIREMENT="pytorch-triton-xpu==${TRITON_VERSION}" + TRITON_REQUIREMENT="triton-xpu==${TRITON_VERSION}" if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-xpu.txt) - TRITON_REQUIREMENT="pytorch-triton-xpu==${TRITON_VERSION}+git${TRITON_SHORTHASH}" + TRITON_REQUIREMENT="triton-xpu==${TRITON_VERSION}+git${TRITON_SHORTHASH}" fi if [[ -z "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${TRITON_REQUIREMENT}" diff --git a/.github/scripts/build_triton_wheel.py b/.github/scripts/build_triton_wheel.py index 11fa8404273..34c6c3549f9 100644 --- a/.github/scripts/build_triton_wheel.py +++ b/.github/scripts/build_triton_wheel.py @@ -71,12 +71,12 @@ def build_triton( triton_repo = "https://github.com/openai/triton" if device == "rocm": - triton_pkg_name = "pytorch-triton-rocm" + triton_pkg_name = "triton-rocm" elif device == "xpu": - triton_pkg_name = "pytorch-triton-xpu" + triton_pkg_name = "triton-xpu" triton_repo = "https://github.com/intel/intel-xpu-backend-for-triton" else: - triton_pkg_name = "pytorch-triton" + triton_pkg_name = "triton" check_call(["git", "clone", triton_repo, "triton"], cwd=tmpdir) if release: ver, rev, patch = version.split(".") diff --git a/.github/workflows/build-triton-wheel.yml b/.github/workflows/build-triton-wheel.yml index f8fe484b042..5ab115698fb 100644 --- a/.github/workflows/build-triton-wheel.yml +++ b/.github/workflows/build-triton-wheel.yml @@ -171,7 +171,7 @@ jobs: - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: - name: pytorch-triton-wheel-${{ matrix.py_vers }}-${{ matrix.device }}-${{ env.PLATFORM }} + name: triton-wheel-${{ matrix.py_vers }}-${{ matrix.device }}-${{ env.PLATFORM }} if-no-files-found: error path: ${{ runner.temp }}/artifacts/wheelhouse/* @@ -258,7 +258,7 @@ jobs: mv ./*.whl "${RUNNER_TEMP}/artifacts/" - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: - name: pytorch-triton-wheel-${{ matrix.py_vers }}-${{ matrix.device }} + name: triton-wheel-${{ matrix.py_vers }}-${{ matrix.device }} if-no-files-found: error path: ${{ runner.temp }}/artifacts/* @@ -302,7 +302,7 @@ jobs: run: | set -x mkdir -p "${RUNNER_TEMP}/artifacts/" - mv "${RUNNER_TEMP}"/artifacts-all/pytorch-triton-wheel-*/* "${RUNNER_TEMP}/artifacts/" + mv "${RUNNER_TEMP}"/artifacts-all/triton-wheel-*/* "${RUNNER_TEMP}/artifacts/" - name: Set DRY_RUN (only for tagged pushes) if: ${{ github.event_name == 'push' && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) }} diff --git a/RELEASE.md b/RELEASE.md index 87f042d659f..66bfd3a8dd1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -497,13 +497,13 @@ An example of this process can be found here: In nightly builds for conda and wheels pytorch depend on Triton build by this workflow: https://hud.pytorch.org/hud/pytorch/pytorch/nightly/1?per_page=50&name_filter=Build%20Triton%20Wheel. The pinned version of triton used by this workflow is specified here: https://github.com/pytorch/pytorch/blob/main/.ci/docker/ci_commit_pins/triton.txt . In Nightly builds we have following configuration: -* Conda builds, depend on: https://anaconda.org/pytorch-nightly/torchtriton -* Wheel builds, depend on : https://download.pytorch.org/whl/nightly/pytorch-triton/ -* Rocm wheel builds, depend on : https://download.pytorch.org/whl/nightly/pytorch-triton-rocm/ +* Wheel builds, depend on : https://download.pytorch.org/whl/nightly/triton/ +* ROCm wheel builds, depend on : https://download.pytorch.org/whl/nightly/triton-rocm/ +* XPU wheel builds, depend on : https://download.pytorch.org/whl/nightly/triton-xpu/ However for release we have following : -* Conda builds, depend on: https://anaconda.org/pytorch-test/torchtriton for test and https://anaconda.org/pytorch/torchtriton for release * Wheel builds, depend only triton pypi package: https://pypi.org/project/triton/ for both test and release -* Rocm wheel builds, depend on : https://download.pytorch.org/whl/test/pytorch-triton-rocm/ for test and https://download.pytorch.org/whl/pytorch-triton-rocm/ for release +* ROCm wheel builds, depend on : https://download.pytorch.org/whl/test/triton-rocm/ for test and https://download.pytorch.org/whl/triton-rocm/ for release +* XPU wheel builds, depend on : https://download.pytorch.org/whl/test/triton-xpu/ for test and https://download.pytorch.org/whl/triton-xpu/ for release Important: The release of https://pypi.org/project/triton/ needs to be requested from OpenAI once branch cut is completed. Please include the release PIN hash in the request: https://github.com/pytorch/pytorch/blob/release/2.1/.ci/docker/ci_commit_pins/triton.txt . diff --git a/scripts/install_triton_wheel.sh b/scripts/install_triton_wheel.sh index 5c4e72b8d3e..30452d98fc2 100755 --- a/scripts/install_triton_wheel.sh +++ b/scripts/install_triton_wheel.sh @@ -8,10 +8,10 @@ DOWNLOAD_PYTORCH_ORG="https://download.pytorch.org/whl" if [[ -z "${USE_XPU}" ]]; then # Default install from PyTorch source - TRITON_VERSION="pytorch-triton==$(cat .ci/docker/triton_version.txt)" + TRITON_VERSION="triton==$(cat .ci/docker/triton_version.txt)" TRITON_COMMIT_ID="$(head -c 8 .ci/docker/ci_commit_pins/triton.txt)" else - TRITON_VERSION="pytorch-triton-xpu==$(cat .ci/docker/triton_xpu_version.txt)" + TRITON_VERSION="triton-xpu==$(cat .ci/docker/triton_xpu_version.txt)" TRITON_COMMIT_ID="$(head -c 8 .ci/docker/ci_commit_pins/triton-xpu.txt)" fi