mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Remove install from source code build Pull Request resolved: https://github.com/pytorch/pytorch/pull/155675 Approved by: https://github.com/atalman
23 lines
830 B
Bash
Executable File
23 lines
830 B
Bash
Executable File
#!/bin/bash
|
|
# Updates Triton to the pinned version for this copy of PyTorch
|
|
PYTHON="python3"
|
|
PIP="$PYTHON -m pip"
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
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_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_COMMIT_ID="$(head -c 8 .ci/docker/ci_commit_pins/triton-xpu.txt)"
|
|
fi
|
|
|
|
if [[ "$BRANCH" =~ .*release.* ]]; then
|
|
${PIP} install --index-url ${DOWNLOAD_PYTORCH_ORG}/test/ $TRITON_VERSION
|
|
else
|
|
${PIP} install --index-url ${DOWNLOAD_PYTORCH_ORG}/nightly/ $TRITON_VERSION+git${TRITON_COMMIT_ID}
|
|
fi
|