Skip to content

Commit 6f2331b

Browse files
authored
Cortex-M backend: add cortex-m7 to the trunk e2e CI matrix (pytorch#19730)
### Summary Extends `_test_cortex_m_e2e.yml` with a `targets` input that joins the existing `model` matrix to give a target × model cross product, so trunk can exercise the same suite against multiple Cortex-M variants. The trunk job opts in to `["cortex-m55", "cortex-m7"]`; the nightly job (and any future caller that doesn't pass `targets`) falls back to the M55-only default and keeps its current shape. Cortex-M7 is the first non-MVE variant to enter CI. It exercises the DSP-class CMSIS-NN kernel paths (selected via `__ARM_FEATURE_DSP`), covering the build plumbing that threads `-mcpu=cortex-m7` through to both the runner and the core libraries. `pull.yml`'s `test-mcu-cortex-m-backend` is intentionally left at M55-only — per-PR coverage is deferred until the trunk M7 leg demonstrates stability over a few cycles. ### Test plan CI Authored with Claude.
1 parent 10bc51e commit 6f2331b

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

.ci/scripts/test_cortex_m_e2e.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
set -eu
1515

1616
MODEL=$1
17+
TARGET=${2:-cortex-m55}
1718
script_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
1819
et_root_dir=$(realpath "${script_dir}/../..")
1920

20-
# Quantization is the default for the cortex-m55 target; run.sh's
21+
# Quantization is the default for cortex-m targets; run.sh's
2122
# arg parser only recognizes --no_quantize, so we omit any explicit flag.
2223
export ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA=True
2324
bash "${et_root_dir}/examples/arm/run.sh" \
2425
--model_name="${MODEL}" \
25-
--target=cortex-m55 \
26+
--target="${TARGET}" \
2627
--bundleio

.github/workflows/_test_cortex_m_e2e.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
description: 'JSON array of model names to run on the Corstone-300 FVP, e.g. ["mv2", "mv3"]'
1212
required: true
1313
type: string
14+
targets:
15+
description: 'JSON array of cortex-m target CPUs to build the runner for, e.g. ["cortex-m55", "cortex-m7"]'
16+
required: false
17+
type: string
18+
default: '["cortex-m55"]'
1419
timeout:
1520
description: 'Per-matrix-entry timeout in minutes'
1621
required: false
@@ -23,9 +28,10 @@ jobs:
2328
strategy:
2429
matrix:
2530
model: ${{ fromJSON(inputs.models) }}
31+
target: ${{ fromJSON(inputs.targets) }}
2632
fail-fast: false
2733
with:
28-
job-name: ${{ matrix.model }}
34+
job-name: ${{ matrix.model }}-${{ matrix.target }}
2935
runner: linux.2xlarge.memory
3036
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
3137
submodules: 'recursive'
@@ -44,4 +50,4 @@ jobs:
4450
source examples/arm/arm-scratch/setup_path.sh
4551
4652
# Export and run model on FVP (run.sh internally builds the test runner).
47-
bash .ci/scripts/test_cortex_m_e2e.sh ${{ matrix.model }}
53+
bash .ci/scripts/test_cortex_m_e2e.sh "${{ matrix.model }}" "${{ matrix.target }}"

.github/workflows/trunk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,3 +1075,4 @@ jobs:
10751075
uses: ./.github/workflows/_test_cortex_m_e2e.yml
10761076
with:
10771077
models: '["mv2", "mv3"]'
1078+
targets: '["cortex-m55", "cortex-m7"]'

0 commit comments

Comments
 (0)