Skip to content

Commit af97aff

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

File tree

3 files changed

+31
-41
lines changed

3 files changed

+31
-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: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,39 @@ 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: [add, add_mul, emformer_join, emformer_transcribe, ic3, ic4, linear, llama2, mobilebert, mv2, mv3, resnet18, resnet50, vit, w2l]
27+
backend: [portable, xnnpack-quantization-delegation]
28+
build-tool: [cmake]
29+
runner: [macos-m1-stable]
30+
include:
31+
- model: efficient_sam
32+
backend: portable
33+
- model: llama
34+
backend: portable
35+
- model: llama3_2_vision_encoder
36+
backend: portable
37+
- model: lstm
38+
backend: portable
39+
- model: mul
40+
backend: portable
41+
- model: phi-4-mini
42+
backend: portable
43+
- model: qwen2_5
44+
backend: portable
45+
- model: softmax
46+
backend: portable
4547
fail-fast: false
4648
with:
4749
runner: ${{ matrix.runner }}
4850
python-version: '3.11'
4951
submodules: 'true'
5052
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
51-
timeout: ${{ matrix.timeout }}
53+
timeout: 90
5254
script: |
5355
MODEL_NAME=${{ matrix.model }}
5456
BUILD_TOOL=${{ matrix.build-tool }}

0 commit comments

Comments
 (0)