Skip to content

Refactor gather_test_model to be hard coded directly #9227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ci/scripts/gather_test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# WARNING: The CI runner logic should directly be in the corresponding yml files
# This file will be deleted once the reference in periodic.yml is deleted.

import itertools
import json
import os
Expand Down
25 changes: 5 additions & 20 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,6 @@ concurrency:
cancel-in-progress: true

jobs:
gather-models:
runs-on: ubuntu-22.04
outputs:
models: ${{ steps.gather-models.outputs.models }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'false'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Extract the list of models to test
id: gather-models
run: |
set -eux

PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "${GITHUB_EVENT_NAME}"

test-setup-linux-gcc:
name: test-setup-linux-gcc
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
Expand Down Expand Up @@ -62,9 +44,12 @@ jobs:
permissions:
id-token: write
contents: read
needs: gather-models
strategy:
matrix: ${{ fromJSON(needs.gather-models.outputs.models) }}
matrix:
model: [mv3, vit]
backend: [portable, xnnpack-quantization-delegation]
build-tool: [cmake, buck2]
runner: [linux.2xlarge]
fail-fast: false
with:
runner: ${{ matrix.runner }}
Expand Down
44 changes: 23 additions & 21 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,39 @@ concurrency:
cancel-in-progress: true

jobs:
gather-models:
runs-on: ubuntu-22.04
outputs:
models: ${{ steps.gather-models.outputs.models }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'false'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Extract the list of models to test
id: gather-models
run: |
set -eux

PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --target-os macos --event "${GITHUB_EVENT_NAME}"

test-models-macos:
name: test-models-macos
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
needs: gather-models
strategy:
matrix: ${{ fromJSON(needs.gather-models.outputs.models) }}
matrix:
model: [add, add_mul, emformer_join, emformer_transcribe, ic3, ic4, linear, llama2, mobilebert, mv2, mv3, resnet18, resnet50, vit, w2l]
backend: [portable, xnnpack-quantization-delegation]
build-tool: [cmake]
runner: [macos-m1-stable]
include:
- model: efficient_sam
backend: portable
- model: llama
backend: portable
- model: llama3_2_vision_encoder
backend: portable
- model: lstm
backend: portable
- model: mul
backend: portable
- model: phi-4-mini
backend: portable
- model: qwen2_5
backend: portable
- model: softmax
backend: portable
fail-fast: false
with:
runner: ${{ matrix.runner }}
python-version: '3.11'
submodules: 'true'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: ${{ matrix.timeout }}
timeout: 90
script: |
MODEL_NAME=${{ matrix.model }}
BUILD_TOOL=${{ matrix.build-tool }}
Expand Down
Loading