diff --git a/.github/workflows/_test_cortex_m_e2e.yml b/.github/workflows/_test_cortex_m_e2e.yml new file mode 100644 index 00000000000..8e7d3269912 --- /dev/null +++ b/.github/workflows/_test_cortex_m_e2e.yml @@ -0,0 +1,50 @@ +name: Test Cortex-M e2e + +permissions: + id-token: write + contents: read + +on: + workflow_call: + inputs: + models: + description: 'JSON array of model names to run on the Corstone-300 FVP, e.g. ["mv2", "mv3"]' + required: true + type: string + timeout: + description: 'Per-matrix-entry timeout in minutes' + required: false + type: number + default: 120 + +jobs: + run: + uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + strategy: + matrix: + model: ${{ fromJSON(inputs.models) }} + fail-fast: false + with: + job-name: ${{ matrix.model }} + runner: linux.2xlarge.memory + docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk + submodules: 'recursive' + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + timeout: ${{ inputs.timeout }} + script: | + # The generic Linux job chooses to use base env, not the one setup by the image + CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]") + conda activate "${CONDA_ENV}" + + source .ci/scripts/utils.sh + install_executorch "--use-pt-pinned-commit" + + # Install arm dependencies + .ci/scripts/setup-arm-baremetal-tools.sh + source examples/arm/arm-scratch/setup_path.sh + + # Build cortex-m test runner with bundled IO support + backends/cortex_m/test/build_test_runner.sh + + # Export model and run on FVP + bash .ci/scripts/test_cortex_m_e2e.sh ${{ matrix.model }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a26e0f0cc2e..30cbb487aa7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -37,6 +37,16 @@ jobs: with: ref: ${{ github.sha }} + test-cortex-m-e2e-nightly: + name: test-cortex-m-e2e-nightly + permissions: + id-token: write + contents: read + uses: ./.github/workflows/_test_cortex_m_e2e.yml + with: + models: '["ds_cnn", "mobilenet_v1_025", "resnet8", "deep_autoencoder"]' + timeout: 180 + test-static-hf-llm-qnn-linux: name: test-static-hf-llm-qnn-linux uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index 98f54168b9f..8c9800164a0 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -1057,34 +1057,9 @@ jobs: test-cortex-m-e2e: name: test-cortex-m-e2e - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main - strategy: - matrix: - model: [mv2, mv3] - fail-fast: false permissions: id-token: write contents: read + uses: ./.github/workflows/_test_cortex_m_e2e.yml with: - runner: linux.2xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk - submodules: 'recursive' - ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - timeout: 120 - script: | - # The generic Linux job chooses to use base env, not the one setup by the image - CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]") - conda activate "${CONDA_ENV}" - - source .ci/scripts/utils.sh - install_executorch "--use-pt-pinned-commit" - - # Install arm dependencies - .ci/scripts/setup-arm-baremetal-tools.sh - source examples/arm/arm-scratch/setup_path.sh - - # Build cortex-m test runner with bundled IO support - backends/cortex_m/test/build_test_runner.sh - - # Export model and run on FVP - bash .ci/scripts/test_cortex_m_e2e.sh ${{ matrix.model }} + models: '["mv2", "mv3"]'