mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
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
This commit is contained in:
committed by
PyTorch MergeBot
parent
2bd5e17f53
commit
06b03073b5
@@ -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}"
|
||||
|
||||
6
.github/scripts/build_triton_wheel.py
vendored
6
.github/scripts/build_triton_wheel.py
vendored
@@ -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(".")
|
||||
|
||||
6
.github/workflows/build-triton-wheel.yml
vendored
6
.github/workflows/build-triton-wheel.yml
vendored
@@ -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')) }}
|
||||
|
||||
10
RELEASE.md
10
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 .
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user