File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ conda install -c pytorch magma-cuda121 # or the magma-cuda* that matches your C
213
213
214
214
# (optional) If using torch.compile with inductor/triton, install the matching version of triton
215
215
# Run from the pytorch directory after cloning
216
+ # For Intel GPU support, please explicitly `export USE_XPU=1` before running command.
216
217
make triton
217
218
```
218
219
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Updates Triton to the pinned version for this copy of PyTorch
3
3
BRANCH=$( git rev-parse --abbrev-ref HEAD)
4
- TRITON_VERSION=" pytorch-triton==$( cat .ci/docker/triton_version.txt) "
5
- DOWNLOAD_PYTORCH_ORG=" https://download.pytorch.org/whl"
6
4
7
- if [[ " $BRANCH " =~ .* release.* ]]; then
8
- pip install --index-url ${DOWNLOAD_PYTORCH_ORG} /test/ $TRITON_VERSION
5
+ if [[ -z " ${USE_XPU} " ]]; then
6
+ # Default install from PyTorch source
7
+
8
+ TRITON_VERSION=" pytorch-triton==$( cat .ci/docker/triton_version.txt) "
9
+ DOWNLOAD_PYTORCH_ORG=" https://download.pytorch.org/whl"
10
+ if [[ " $BRANCH " =~ .* release.* ]]; then
11
+ pip install --index-url ${DOWNLOAD_PYTORCH_ORG} /test/ $TRITON_VERSION
12
+ else
13
+ pip install --index-url ${DOWNLOAD_PYTORCH_ORG} /nightly/ $TRITON_VERSION +$( head -c 10 .ci/docker/ci_commit_pins/triton.txt)
14
+ fi
9
15
else
10
- pip install --index-url ${DOWNLOAD_PYTORCH_ORG} /nightly/ $TRITON_VERSION +$( head -c 10 .ci/docker/ci_commit_pins/triton.txt)
16
+ # Always install Triton for XPU from source
17
+
18
+ TRITON_XPU_REPO=" https://github.com/intel/intel-xpu-backend-for-triton"
19
+ TRITON_XPU_COMMIT_ID=" $( cat .ci/docker/ci_commit_pins/triton-xpu.txt) "
20
+
21
+ # force-reinstall to ensure the pinned version is installed
22
+ pip install --force-reinstall " git+${TRITON_XPU_REPO} @${TRITON_XPU_COMMIT_ID} #subdirectory=python"
11
23
fi
You can’t perform that action at this time.
0 commit comments