[XPU] Fix TRITON_XPU_BUILD_FROM_SOURCE (#142850)

Fixes #142849

The idea is to remove the redundant 'git' in TRITON_XPU_BUILD_FROM_SOURCE=1 case (L29) while keep it in pre-build whl installation.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/142850
Approved by: https://github.com/chuanqi129, https://github.com/benjaminglass1, https://github.com/EikanWang, https://github.com/atalman
This commit is contained in:
Ding, Yi1
2025-01-11 13:11:55 +00:00
committed by PyTorch MergeBot
parent b7bef1ca84
commit 2e3b051154

View File

@ -19,9 +19,9 @@ else
# it will install Triton from the source.
TRITON_VERSION="pytorch-triton-xpu==$(cat .ci/docker/triton_version.txt)"
TRITON_XPU_COMMIT_ID="git$(head -c 8 .ci/docker/ci_commit_pins/triton-xpu.txt)"
TRITON_XPU_COMMIT_ID="$(head -c 8 .ci/docker/ci_commit_pins/triton-xpu.txt)"
if [[ -z "${TRITON_XPU_BUILD_FROM_SOURCE}" ]]; then
pip install --index-url ${DOWNLOAD_PYTORCH_ORG}/nightly/ ${TRITON_VERSION}+${TRITON_XPU_COMMIT_ID}
pip install --index-url ${DOWNLOAD_PYTORCH_ORG}/nightly/ ${TRITON_VERSION}+git${TRITON_XPU_COMMIT_ID}
else
TRITON_XPU_REPO="https://github.com/intel/intel-xpu-backend-for-triton"