-
Notifications
You must be signed in to change notification settings - Fork 27.6k
442 lines (416 loc) · 19.7 KB
/
trunk.yml
File metadata and controls
442 lines (416 loc) · 19.7 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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
name: trunk
on:
push:
branches:
- main
- release/*
- landchecks/*
tags:
- ciflow/trunk/*
workflow_dispatch:
inputs:
jobs-to-include:
description: "Space-separated list of job display names to run (empty = all)"
required: false
default: ""
type: string
tests-to-include:
description: "Space-separated tests to include (passed to test runner; empty = default)"
required: false
default: ""
type: string
schedule:
- cron: 29 8 * * * # about 1:29am PDT
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' && github.run_id }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
actions: read
jobs:
# See job-filter.yml for rules on adding job filter conditions
job-filter:
if: github.repository_owner == 'pytorch'
name: job-filter
uses: ./.github/workflows/job-filter.yml
with:
jobs-to-include: ${{ github.event.inputs.jobs-to-include || '' }}
llm-td:
if: github.repository_owner == 'pytorch'
name: before-test
uses: ./.github/workflows/llm_td_retrieval.yml
target-determination:
name: before-test
uses: ./.github/workflows/target_determination.yml
needs: llm-td
get-label-type:
name: get-label-type
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
if: ${{ (github.event_name != 'schedule' || github.repository == 'pytorch/pytorch') && github.repository_owner == 'pytorch' }}
with:
triggering_actor: ${{ github.triggering_actor }}
issue_owner: ${{ github.event.pull_request.user.login || github.event.issue.user.login }}
curr_branch: ${{ github.head_ref || github.ref_name }}
curr_ref_type: ${{ github.ref_type }}
check_experiments: arc,lf
libtorch-linux-jammy-cuda13_0-py3_10-gcc11-debug-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' libtorch-linux-jammy-cuda13.0-py3.10-gcc11-debug ') }}
name: libtorch-linux-jammy-cuda13.0-py3.10-gcc11-debug
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
build-environment: libtorch-linux-jammy-cuda13.0-py3.10-gcc11
docker-image-name: ci-image:pytorch-linux-jammy-cuda13.0-cudnn9-py3-gcc11
build-generates-artifacts: false
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
runner: "linux.r7i.4xlarge"
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 1 },
]}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
cuda-version: "13.0"
secrets: inherit
linux-jammy-cuda13_0-py3_10-gcc11-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' linux-jammy-cuda13.0-py3.10-gcc11 ') || contains(needs.job-filter.outputs.jobs, ' cross-compile-linux-test-cuda13 ') }}
name: linux-jammy-cuda13.0-py3.10-gcc11
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-cuda13.0-py3.10-gcc11
docker-image-name: ci-image:pytorch-linux-jammy-cuda13.0-cudnn9-py3-gcc11
cuda-arch-list: '7.5 8.9'
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g6.4xlarge.experimental.nvidia.gpu" },
{ config: "default", shard: 2, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g6.4xlarge.experimental.nvidia.gpu" },
{ config: "default", shard: 3, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g6.4xlarge.experimental.nvidia.gpu" },
{ config: "default", shard: 4, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g6.4xlarge.experimental.nvidia.gpu" },
{ config: "default", shard: 5, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g6.4xlarge.experimental.nvidia.gpu" },
{ config: "distributed", shard: 1, num_shards: 3, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g4dn.12xlarge.nvidia.gpu" },
{ config: "distributed", shard: 2, num_shards: 3, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g4dn.12xlarge.nvidia.gpu" },
{ config: "distributed", shard: 3, num_shards: 3, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g4dn.12xlarge.nvidia.gpu" },
{ config: "pr_time_benchmarks", shard: 1, num_shards: 1, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g4dn.metal.nvidia.gpu" },
# Test cross-compiled models with Windows libs extracted from wheel (CUDA 13.0)
{ config: "aoti_cross_compile_for_windows", shard: 1, num_shards: 1, runner: "${{ needs.get-label-type.outputs.label-type }}linux.g6.4xlarge.experimental.nvidia.gpu", win_torch_wheel_artifact: "win-vs2022-cuda13.0-py3" },
]}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
cuda-version: "13.0"
secrets: inherit
linux-jammy-cuda13_0-py3_10-gcc11-test:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' linux-jammy-cuda13.0-py3.10-gcc11 ') }}
name: linux-jammy-cuda13.0-py3.10-gcc11
uses: ./.github/workflows/_linux-test.yml
needs:
- linux-jammy-cuda13_0-py3_10-gcc11-build
- win-vs2022-cuda13_0-py3-build
- target-determination
- job-filter
- get-label-type
with:
timeout-minutes: 360
build-environment: linux-jammy-cuda13.0-py3.10-gcc11
docker-image: ${{ needs.linux-jammy-cuda13_0-py3_10-gcc11-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-jammy-cuda13_0-py3_10-gcc11-build.outputs.test-matrix }}
tests-to-include: ${{ github.event.inputs.tests-to-include || '' }}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
cuda-version: "13.0"
secrets: inherit
# no-ops builds test USE_PER_OPERATOR_HEADERS=0 where ATen/ops is not generated
linux-jammy-cuda13_0-py3_10-gcc11-no-ops-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' linux-jammy-cuda13.0-py3.10-gcc11-no-ops ') }}
name: linux-jammy-cuda13.0-py3.10-gcc11-no-ops
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-cuda13.0-py3.10-gcc11-no-ops
cuda-arch-list: '7.5 8.9'
docker-image-name: ci-image:pytorch-linux-jammy-cuda13.0-cudnn9-py3-gcc11
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 1 },
]}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
cuda-version: "13.0"
secrets: inherit
macos-py3-arm64-build:
if: ${{ github.repository_owner == 'pytorch' && (needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' macos-py3-arm64 ')) }}
name: macos-py3-arm64
uses: ./.github/workflows/_mac-build.yml
needs: job-filter
with:
sync-tag: macos-py3-arm64-build
build-environment: macos-py3-arm64
runner-type: macos-m1-stable
build-generates-artifacts: true
# To match the one pre-installed in the m1 runners
python-version: 3.12.7
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 3, runner: "macos-m1-stable" },
{ config: "default", shard: 2, num_shards: 3, runner: "macos-m1-stable" },
{ config: "default", shard: 3, num_shards: 3, runner: "macos-m1-stable" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m1-14" },
{ config: "mps", shard: 1, num_shards: 1, runner: "macos-m2-15" },
{ config: "openreg", shard: 1, num_shards: 1, runner: "macos-m1-stable" },
]}
secrets: inherit
macos-py3-arm64-test:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' macos-py3-arm64 ') }}
name: macos-py3-arm64
uses: ./.github/workflows/_mac-test.yml
needs:
- macos-py3-arm64-build
- target-determination
- job-filter
with:
build-environment: ${{ needs.macos-py3-arm64-build.outputs.build-environment }}
# Same as the build job
python-version: 3.12.7
test-matrix: ${{ needs.macos-py3-arm64-build.outputs.test-matrix }}
disable-monitor: false
secrets: inherit
# NB: Windows runners are not available in OSDC, so we run this on Meta account
# for now until we get OSDC deployed to LF account
win-vs2022-cpu-py3-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' win-vs2022-cpu-py3 ') }}
name: win-vs2022-cpu-py3
uses: ./.github/workflows/_win-build.yml
needs:
- get-label-type
- job-filter
with:
build-environment: win-vs2022-cpu-py3
cuda-version: cpu
runner: windows.4xlarge.nonephemeral
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 4, runner: "windows.4xlarge.nonephemeral" },
{ config: "default", shard: 2, num_shards: 4, runner: "windows.4xlarge.nonephemeral" },
{ config: "default", shard: 3, num_shards: 4, runner: "windows.4xlarge.nonephemeral" },
{ config: "default", shard: 4, num_shards: 4, runner: "windows.4xlarge.nonephemeral" },
{ config: "openreg", shard: 1, num_shards: 1, runner: "windows.4xlarge.nonephemeral" },
]}
secrets: inherit
win-vs2022-cpu-py3-test:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' win-vs2022-cpu-py3 ') }}
name: win-vs2022-cpu-py3
uses: ./.github/workflows/_win-test.yml
needs:
- win-vs2022-cpu-py3-build
- target-determination
- job-filter
with:
build-environment: ${{ needs.win-vs2022-cpu-py3-build.outputs.build-environment }}
cuda-version: cpu
test-matrix: ${{ needs.win-vs2022-cpu-py3-build.outputs.test-matrix }}
disable-monitor: false
secrets: inherit
# NB: Windows runners are not available in OSDC, so we run this on Meta account
# for now until we get OSDC deployed to LF account
win-vs2022-cuda13_0-py3-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' win-vs2022-cuda13.0-py3 ') || contains(needs.job-filter.outputs.jobs, ' cross-compile-linux-test-cuda13 ') }}
name: win-vs2022-cuda13.0-py3
uses: ./.github/workflows/_win-build.yml
needs:
- get-label-type
- job-filter
with:
build-environment: win-vs2022-cuda13.0-py3
cuda-version: "13.0"
runner: windows.4xlarge.nonephemeral
secrets: inherit
linux-jammy-rocm-py3_10-build:
name: linux-jammy-rocm-py3.10-mi355
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
# Only set the prefix when use-arc is set to true, they go together
runner_prefix: ""
build-environment: linux-jammy-rocm-py3.10-mi355
docker-image-name: ci-image:pytorch-linux-jammy-rocm-n-py3
# TODO (huydhn): Add this back once other workflow migrates
# sync-tag: rocm-build
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 6, runner: "linux.rocm.gpu.gfx950.1" },
{ config: "default", shard: 2, num_shards: 6, runner: "linux.rocm.gpu.gfx950.1" },
{ config: "default", shard: 3, num_shards: 6, runner: "linux.rocm.gpu.gfx950.1" },
{ config: "default", shard: 4, num_shards: 6, runner: "linux.rocm.gpu.gfx950.1" },
{ config: "default", shard: 5, num_shards: 6, runner: "linux.rocm.gpu.gfx950.1" },
{ config: "default", shard: 6, num_shards: 6, runner: "linux.rocm.gpu.gfx950.1" },
{ config: "distributed", shard: 1, num_shards: 3, runner: "linux.rocm.gpu.gfx950.2" },
{ config: "distributed", shard: 2, num_shards: 3, runner: "linux.rocm.gpu.gfx950.2" },
{ config: "distributed", shard: 3, num_shards: 3, runner: "linux.rocm.gpu.gfx950.2" },
]}
use-arc: false
python-version: "3.10"
secrets: inherit
linux-jammy-rocm-py3_10-test:
name: linux-jammy-rocm-py3.10-mi355
uses: ./.github/workflows/_rocm-test.yml
needs:
- linux-jammy-rocm-py3_10-build
- target-determination
- job-filter
with:
build-environment: ${{ needs.linux-jammy-rocm-py3_10-build.outputs.build-environment }}
docker-image: ${{ needs.linux-jammy-rocm-py3_10-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-jammy-rocm-py3_10-build.outputs.test-matrix }}
tests-to-include: ${{ github.event.inputs.tests-to-include || '' }}
secrets: inherit
inductor-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' inductor-build ') }}
name: inductor-build
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-cuda13.0-py3.12-gcc11-sm80
docker-image-name: ci-image:pytorch-linux-jammy-cuda13.0-cudnn9-py3-gcc11-inductor-benchmarks
cuda-arch-list: '8.0'
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.12"
compiler: gcc11
cuda-version: "13.0"
secrets: inherit
verify-cachebench-cpu-build:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' verify-cachebench-cpu-build ') || contains(needs.job-filter.outputs.jobs, ' verify-cachebench-cpu-test ') }}
name: verify-cachebench-cpu-build
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-py3.10-gcc11
docker-image-name: ci-image:pytorch-linux-jammy-py3-gcc11-inductor-benchmarks
test-matrix: |
{ include: [
{ config: "verify_cachebench", shard: 1, num_shards: 1, runner: "${{ needs.get-label-type.outputs.label-type }}linux.2xlarge" },
]}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
secrets: inherit
verify-cachebench-cpu-test:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' verify-cachebench-cpu-test ') }}
name: verify-cachebench-cpu-test
uses: ./.github/workflows/_linux-test.yml
needs:
- verify-cachebench-cpu-build
- target-determination
- job-filter
- get-label-type
with:
build-environment: ${{ needs.verify-cachebench-cpu-build.outputs.build-environment }}
docker-image: ${{ needs.verify-cachebench-cpu-build.outputs.docker-image }}
test-matrix: ${{ needs.verify-cachebench-cpu-build.outputs.test-matrix }}
tests-to-include: ${{ github.event.inputs.tests-to-include || '' }}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
secrets: inherit
linux-jammy-py3-clang18-executorch-build:
# if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' linux-jammy-py3-clang18-executorch ') }}
name: linux-jammy-py3-clang18-executorch
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
if: false # Has been broken for a while
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-py3-clang18-executorch
docker-image-name: ci-image:pytorch-linux-jammy-py3-clang18-executorch
test-matrix: |
{ include: [
{ config: "executorch", shard: 1, num_shards: 1, runner: "${{ needs.get-label-type.outputs.label-type }}linux.2xlarge" },
]}
secrets: inherit
linux-jammy-py3-clang18-executorch-test:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' linux-jammy-py3-clang18-executorch ') }}
name: linux-jammy-py3-clang18-executorch
uses: ./.github/workflows/_linux-test.yml
needs:
- linux-jammy-py3-clang18-executorch-build
- job-filter
with:
build-environment: ${{ needs.linux-jammy-py3-clang18-executorch-build.outputs.build-environment }}
docker-image: ${{ needs.linux-jammy-py3-clang18-executorch-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-jammy-py3-clang18-executorch-build.outputs.test-matrix }}
tests-to-include: ${{ github.event.inputs.tests-to-include || '' }}
secrets: inherit
linux-jammy-py3_10-gcc11-full-debug-build-only:
if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' linux-jammy-py3.10-gcc11-full-debug-build-only ') }}
name: linux-jammy-py3.10-gcc11-full-debug-build-only
uses: ./.github/workflows/_linux-build.yml
needs:
- get-label-type
- job-filter
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
runner: linux.r7i.2xlarge
build-environment: linux-jammy-py3.10-gcc11-full-debug-build-only
docker-image-name: ci-image:pytorch-linux-jammy-py3.10-clang18
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc11
secrets: inherit
linux-jammy-aarch64-py3_10-gcc13-build:
name: linux-jammy-aarch64-py3.10
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
runner_prefix: ${{ needs.get-label-type.outputs.label-type }}
build-environment: linux-jammy-aarch64-py3.10
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc13
runner: linux.arm64.m7g.4xlarge
# Periodic AArch64 tests for SVE256 coverage
test-matrix: |
{ include: [
{ config: "default", shard: 1, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.arm64.m7g.4xlarge" },
{ config: "default", shard: 2, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.arm64.m7g.4xlarge" },
{ config: "default", shard: 3, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.arm64.m7g.4xlarge" },
{ config: "default", shard: 4, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.arm64.m7g.4xlarge" },
{ config: "default", shard: 5, num_shards: 5, runner: "${{ needs.get-label-type.outputs.label-type }}linux.arm64.m7g.4xlarge" },
]}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc13
secrets: inherit
linux-jammy-aarch64-py3_10-gcc13-test:
name: linux-jammy-aarch64-py3.10
uses: ./.github/workflows/_linux-test.yml
needs:
- linux-jammy-aarch64-py3_10-gcc13-build
- get-label-type
with:
build-environment: ${{ needs.linux-jammy-aarch64-py3_10-gcc13-build.outputs.build-environment }}
docker-image: ${{ needs.linux-jammy-aarch64-py3_10-gcc13-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-jammy-aarch64-py3_10-gcc13-build.outputs.test-matrix }}
use-arc: ${{ needs.get-label-type.outputs.use-arc == 'true' }}
python-version: "3.10"
compiler: gcc13
secrets: inherit