Repository navigation
273 lines (256 loc) · 9.47 KB
/
Copy pathrocm.yml
File metadata and controls
273 lines (256 loc) · 9.47 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# Test ExecuTorch AOTI ROCm support.
# Use gfx950 for routine functional coverage and reserve scarce gfx1100 RDNA
# runners for changes that directly affect the Voxtral ROCm path.
name: Test ROCm AOTI
on:
push:
branches:
- main
- release/*
tags:
- ciflow/rocm/*
pull_request:
paths:
- .github/workflows/rocm.yml
- .github/workflows/_ci-run-decision.yml
- .github/workflows/_get-changed-files.yml
- .ci/scripts/test-rocm-aoti.sh
- .ci/scripts/test-rocm-voxtral.sh
- CMakeLists.txt
- CMakePresets.json
- Makefile
- install_requirements.py
- torch_pin.py
- backends/aoti/**
- '!backends/aoti/**.md'
- backends/cuda/**
- '!backends/cuda/**.md'
- extension/cuda/**
- examples/cuda/**
- '!examples/cuda/**.md'
- examples/models/voxtral_realtime/**
- '!examples/models/voxtral_realtime/**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: false
permissions:
contents: read
jobs:
changed-files:
name: Get changed files
uses: ./.github/workflows/_get-changed-files.yml
with:
include-push-diff: true
run-decision:
name: CI run decision
uses: ./.github/workflows/_ci-run-decision.yml
aoti-run-decision:
name: AOTI CI run decision
needs: [changed-files, run-decision]
runs-on: ubuntu-latest
outputs:
run-aoti: ${{ steps.decide.outputs.run-aoti }}
steps:
- name: Select AOTI runs
id: decide
env:
CHANGED_FILES: ${{ needs.changed-files.outputs.changed-files }}
FULL_RUN: ${{ needs.run-decision.outputs.is-full-run }}
run: |
set -efu
RUN_AOTI=false
if [[ "$CHANGED_FILES" == "*" || "$FULL_RUN" == "true" ]]; then
RUN_AOTI=true
fi
for path in $CHANGED_FILES; do
case "$path" in
backends/aoti/*.md | backends/cuda/*.md | examples/cuda/*.md)
continue
;;
.github/workflows/rocm.yml | \
.github/workflows/_ci-run-decision.yml | \
.github/workflows/_get-changed-files.yml | \
.ci/scripts/test-rocm-aoti.sh | \
CMakeLists.txt | \
CMakePresets.json | \
install_requirements.py | \
torch_pin.py | \
backends/aoti/* | \
backends/cuda/* | \
extension/cuda/* | \
examples/cuda/*)
RUN_AOTI=true
break
;;
esac
done
echo "run-aoti=$RUN_AOTI" >> "$GITHUB_OUTPUT"
voxtral-run-decision:
name: Voxtral CI run decision
needs: [changed-files, run-decision]
runs-on: ubuntu-latest
outputs:
run-voxtral: ${{ steps.decide.outputs.run-voxtral }}
run-gfx1100: ${{ steps.decide.outputs.run-gfx1100 }}
steps:
- name: Select Voxtral runs
id: decide
env:
CHANGED_FILES: ${{ needs.changed-files.outputs.changed-files }}
EVENT_NAME: ${{ github.event_name }}
FULL_RUN: ${{ needs.run-decision.outputs.is-full-run }}
run: |
set -efu
RUN_VOXTRAL=false
RUN_GFX1100=false
if [[ "$CHANGED_FILES" == "*" || "$FULL_RUN" == "true" ]]; then
RUN_VOXTRAL=true
fi
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
RUN_GFX1100=true
fi
for path in $CHANGED_FILES; do
case "$path" in
examples/models/voxtral_realtime/*.md)
continue
;;
examples/models/voxtral_realtime/* | \
backends/cuda/aoti_packed_int4_tensor.py | \
backends/cuda/triton/kernels/int4_matmul.py | \
backends/cuda/triton/replacement_pass.py | \
.ci/scripts/test-rocm-voxtral.sh | \
.github/workflows/rocm.yml)
RUN_GFX1100=true
RUN_VOXTRAL=true
;;
Makefile | \
CMakeLists.txt | \
CMakePresets.json | \
backends/aoti/* | \
backends/cuda/* | \
extension/cuda/* | \
.github/workflows/_ci-run-decision.yml | \
.github/workflows/_get-changed-files.yml | \
install_requirements.py | \
torch_pin.py)
RUN_VOXTRAL=true
;;
esac
done
echo "run-voxtral=$RUN_VOXTRAL" >> "$GITHUB_OUTPUT"
echo "run-gfx1100=$RUN_GFX1100" >> "$GITHUB_OUTPUT"
unittest-rocm-gfx950:
name: unittest-rocm-gfx950-rocm${{ matrix.rocm-version }}
needs: [aoti-run-decision]
# Skipped on pull requests from a fork: the job requests an OIDC token to
# reach the ROCm runners, which a fork cannot be issued, so it fails while
# starting rather than running anything. The ROCm jobs below already carry
# this condition.
if: |
needs.aoti-run-decision.outputs.run-aoti == 'true' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
strategy:
fail-fast: false
matrix:
rocm-version: ["7.2"]
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
# Since #23603 the quantized GEMM kernels compile and run here instead of
# failing fast; the job takes ~80 min, ~37 of them Int4AutotunePickTest's
# CPU-saturated AOTI compile.
timeout: 150
no-sudo: true
runner: linux.rocm.gpu.gfx950.1
gpu-arch-type: rocm
gpu-arch-version: ${{ matrix.rocm-version }}
use-custom-docker-registry: false
docker-image: pytorch/manylinux2_28-builder:rocm${{ matrix.rocm-version }}
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
script: |
set -eux
eval "$(conda shell.bash hook)"
conda create -n executorch-rocm-ci python=3.11 -y
conda activate executorch-rocm-ci
ROCM_VERSION=${{ matrix.rocm-version }} bash .ci/scripts/test-rocm-aoti.sh
test-voxtral-realtime-rocm-gfx950:
name: test-voxtral-realtime-rocm-gfx950-rocm${{ matrix.rocm-version }}
needs: [voxtral-run-decision]
if: |
needs.voxtral-run-decision.outputs.run-voxtral == 'true' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
secrets: inherit
strategy:
fail-fast: false
matrix:
rocm-version: ["7.2"]
with:
timeout: 180
no-sudo: true
secrets-env: EXECUTORCH_HF_TOKEN
runner: linux.rocm.gpu.gfx950.1
gpu-arch-type: rocm
gpu-arch-version: ${{ matrix.rocm-version }}
use-custom-docker-registry: false
docker-image: pytorch/manylinux2_28-builder:rocm${{ matrix.rocm-version }}
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
script: |
set -eux
eval "$(conda shell.bash hook)"
conda create -n executorch-rocm-ci python=3.11 -y
conda activate executorch-rocm-ci
EXPECTED_ROCM_ARCH=gfx950 EXPECTED_WARP_SIZE=64 \
ROCM_VERSION=${{ matrix.rocm-version }} \
bash .ci/scripts/test-rocm-voxtral.sh
# This scarce RDNA runner is limited to manual runs and direct changes to the
# Voxtral ROCm execution path; it does not participate in broad sampling.
# Temporarily disabled while the self-hosted runner teardown is unstable.
test-voxtral-realtime-rocm-gfx1100:
name: test-voxtral-realtime-rocm-gfx1100-rocm${{ matrix.rocm-version }}
needs: [voxtral-run-decision]
if: |
false && needs.voxtral-run-decision.outputs.run-gfx1100 == 'true' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
concurrency:
group: rocm-gfx1100-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
secrets: inherit
strategy:
fail-fast: false
matrix:
rocm-version: ["7.2"]
with:
timeout: 180
no-sudo: true
secrets-env: EXECUTORCH_HF_TOKEN
runner: linux.rocm.gpu.gfx1100
gpu-arch-type: rocm
gpu-arch-version: ${{ matrix.rocm-version }}
use-custom-docker-registry: false
docker-image: pytorch/manylinux2_28-builder:rocm${{ matrix.rocm-version }}
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
script: |
set -eux
eval "$(conda shell.bash hook)"
conda create -n executorch-rocm-ci python=3.11 -y
conda activate executorch-rocm-ci
EXPECTED_ROCM_ARCH=gfx1100 EXPECTED_WARP_SIZE=32 \
ROCM_VERSION=${{ matrix.rocm-version }} \
bash .ci/scripts/test-rocm-voxtral.sh