Skip to content

Commit 0a6fcd5

Browse files
committed
Refactor and deprecate gather_test_models
1 parent 753da9a commit 0a6fcd5

File tree

3 files changed

+34
-41
lines changed

3 files changed

+34
-41
lines changed

.ci/scripts/gather_test_models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8+
# WARNING: The CI runner logic should directly be in the corresponding yml files
9+
# This file will be deleted once the reference in periodic.yml is deleted.
10+
811
import itertools
912
import json
1013
import os

.github/workflows/pull.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,6 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
gather-models:
17-
runs-on: ubuntu-22.04
18-
outputs:
19-
models: ${{ steps.gather-models.outputs.models }}
20-
steps:
21-
- uses: actions/checkout@v3
22-
with:
23-
submodules: 'false'
24-
- uses: actions/setup-python@v4
25-
with:
26-
python-version: '3.10'
27-
- name: Extract the list of models to test
28-
id: gather-models
29-
run: |
30-
set -eux
31-
32-
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "${GITHUB_EVENT_NAME}"
33-
3416
test-setup-linux-gcc:
3517
name: test-setup-linux-gcc
3618
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
@@ -62,9 +44,12 @@ jobs:
6244
permissions:
6345
id-token: write
6446
contents: read
65-
needs: gather-models
6647
strategy:
67-
matrix: ${{ fromJSON(needs.gather-models.outputs.models) }}
48+
matrix:
49+
model: [mv3, vit]
50+
backend: [portable, xnnpack-quantization-delegation]
51+
build-tool: [cmake, buck2]
52+
runner: [linux.2xlarge]
6853
fail-fast: false
6954
with:
7055
runner: ${{ matrix.runner }}

.github/workflows/trunk.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,42 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
gather-models:
22-
runs-on: ubuntu-22.04
23-
outputs:
24-
models: ${{ steps.gather-models.outputs.models }}
25-
steps:
26-
- uses: actions/checkout@v3
27-
with:
28-
submodules: 'false'
29-
- uses: actions/setup-python@v4
30-
with:
31-
python-version: '3.10'
32-
- name: Extract the list of models to test
33-
id: gather-models
34-
run: |
35-
set -eux
36-
37-
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --target-os macos --event "${GITHUB_EVENT_NAME}"
38-
3921
test-models-macos:
4022
name: test-models-macos
4123
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
42-
needs: gather-models
4324
strategy:
44-
matrix: ${{ fromJSON(needs.gather-models.outputs.models) }}
25+
matrix:
26+
model: [
27+
add, add_mul, emformer_join, emformer_transcribe, ic3, ic4, linear, llama2, mobilebert, mv2, mv3, resnet18, resnet50, vit, w2l,
28+
efficient_sam, llama, llama3_2_vision_encoder, lstm, mul, phi-4-mini, qwen2_5, softmax
29+
]
30+
backend: [portable, xnnpack-quantization-delegation]
31+
build-tool: [cmake]
32+
runner: [macos-m1-stable]
33+
exclude:
34+
- model: efficient_sam
35+
backend: xnnpack-quantization-delegation
36+
- model: llama
37+
backend: xnnpack-quantization-delegation
38+
- model: llama3_2_vision_encoder
39+
backend: xnnpack-quantization-delegation
40+
- model: lstm
41+
backend: xnnpack-quantization-delegation
42+
- model: mul
43+
backend: xnnpack-quantization-delegation
44+
- model: phi-4-mini
45+
backend: xnnpack-quantization-delegation
46+
- model: qwen2_5
47+
backend: xnnpack-quantization-delegation
48+
- model: softmax
49+
backend: xnnpack-quantization-delegation
4550
fail-fast: false
4651
with:
4752
runner: ${{ matrix.runner }}
4853
python-version: '3.11'
4954
submodules: 'true'
5055
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
51-
timeout: ${{ matrix.timeout }}
56+
timeout: 90
5257
script: |
5358
MODEL_NAME=${{ matrix.model }}
5459
BUILD_TOOL=${{ matrix.build-tool }}

0 commit comments

Comments
 (0)