-
Notifications
You must be signed in to change notification settings - Fork 44
160 lines (140 loc) · 5.08 KB
/
nightly-wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Triton wheels
on:
workflow_dispatch:
schedule:
- cron: "5 23 * * *"
push:
branches:
- main
paths:
- .github/workflows/nightly-wheels.yml
- .github/pins/pytorch.txt
permissions: read-all
env:
USE_AOT_DEVLIST: pvc
jobs:
build:
name: Build
runs-on:
- max1100
- rolling
- runner-0.0.20
strategy:
matrix:
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
fail-fast: false
max-parallel: 2
defaults:
run:
shell: bash -noprofile --norc -eo pipefail -c "source /opt/intel/oneapi/setvars.sh > /dev/null; source {0}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Python build dependencies
run: |
# cmake 3.22.1 does not work with the recent torchaudio: https://github.com/intel/intel-xpu-backend-for-triton/issues/2079
pip install wheel cmake
# https://github.com/pytorch/data/blob/e316c5ca1ab2a4f69dd6d48e8fc9c6f8d0c7c468/README.md?plain=1#L6-L15
- name: Install pinned torchdata
run: |
pip install torchdata==0.9.0
- name: Setup PyTorch
uses: ./.github/actions/setup-pytorch
- name: Identify pinned versions
run: |
cd pytorch
echo "TORCHVISION_COMMIT_ID=$(<.github/ci_commit_pins/vision.txt)" | tee -a $GITHUB_ENV
echo "TORCHTEXT_COMMIT_ID=$(<.github/ci_commit_pins/text.txt)" | tee -a $GITHUB_ENV
echo "TORCHAUDIO_COMMIT_ID=$(<.github/ci_commit_pins/audio.txt)" | tee -a $GITHUB_ENV
echo "TRANSFORMERS_VERSION=$(<.ci/docker/ci_commit_pins/huggingface.txt)" | tee -a $GITHUB_ENV
echo "TIMM_COMMIT_ID=$(<.ci/docker/ci_commit_pins/timm.txt)" | tee -a $GITHUB_ENV
- name: Identify Triton commit id
run: |
echo "TRITON_COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Build Triton wheels
uses: ./.github/actions/setup-triton
with:
command: >
DEBUG=1
python setup.py bdist_wheel && pip install dist/*.whl
- name: Install torchvision package
uses: ./.github/actions/install-dependency
with:
package: torchvision
repository: pytorch/vision
ref: ${{ env.TORCHVISION_COMMIT_ID }}
extra-cache-key: ${{ env.PYTORCH_VERSION }}
- name: Install torchtext package
uses: ./.github/actions/install-dependency
with:
package: torchtext
repository: pytorch/text
ref: ${{ env.TORCHTEXT_COMMIT_ID }}
extra-cache-key: ${{ env.PYTORCH_VERSION }}
- name: Install torchaudio package
uses: ./.github/actions/install-dependency
with:
package: torchaudio
repository: pytorch/audio
ref: ${{ env.TORCHAUDIO_COMMIT_ID }}
extra-cache-key: ${{ env.PYTORCH_VERSION }}
- name: Install timm package
uses: ./.github/actions/install-dependency
with:
package: timm
repository: huggingface/pytorch-image-models
ref: ${{ env.TIMM_COMMIT_ID }}
extra-cache-key: ${{ env.PYTORCH_VERSION }}
- name: Install transformers package
uses: ./.github/actions/install-dependency
with:
package: transformers
repository: huggingface/transformers
ref: ${{ env.TRANSFORMERS_VERSION }}
try-tag-prefix: v
extra-cache-key: ${{ env.PYTORCH_VERSION }}
- name: Prepare wheels for upload
run: |
mkdir -p wheels
cp -L pytorch/dist/*.whl wheels/
cp -L python/dist/*.whl wheels/
cp -L torchvision*/dist/*.whl wheels/
cp -L torchtext*/dist/*.whl wheels/
cp -L torchaudio*/dist/*.whl wheels/
cp -L timm*/dist/*.whl wheels/
cp -L transformers*/dist/*.whl wheels/
ls -lh wheels/
- name: Report environment details
run: |
TIMESTAMP=$(date '+%Y%m%d')
echo "TIMESTAMP=$TIMESTAMP" >> "${GITHUB_ENV}"
cat <<EOF | tee wheels/.env
TIMESTAMP=$TIMESTAMP
GITHUB_RUN_ID=$GITHUB_RUN_ID
GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER
GITHUB_RUN_ATTEMPT=$GITHUB_RUN_ATTEMPT
PYTHON_VERSION=$PYTHON_VERSION
PYTORCH_REPO=$PYTORCH_REPO
PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID
LLVM_REPO=llvm/llvm-project
LLVM_COMMIT_ID=$LLVM_COMMIT_ID
TRITON_REPO=intel/intel-xpu-backend-for-triton
TRITON_COMMIT_ID=$TRITON_COMMIT_ID
TORCHVISION_COMMIT_ID=$TORCHVISION_COMMIT_ID
TORCHTEXT_COMMIT_ID=$TORCHTEXT_COMMIT_ID
TORCHAUDIO_COMMIT_ID=$TORCHAUDIO_COMMIT_ID
EOF
- name: Upload PyTorch wheels to artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-pytorch-py${{ matrix.python }}-${{ env.TIMESTAMP }}
path: wheels
include-hidden-files: true