Cortex-M: run op tests against a selectable target#20081
Conversation
Add a --cortex-m-target pytest option (conftest, default cortex-m55). Both the dialect and implementation op tests take the target as a parametrized fixture, so the target appears in the test id and drives the AoT config (and, for implementation tests, the matching per-target FVP runner built by build_test_runner.sh). A new reusable workflow (_test_cortex_m_ops.yml) builds the runner for each target and runs the op suite against it; trunk.yml invokes it for cortex-m7 and cortex-m0plus. cortex-m55 runs on pull via the existing full-suite job. Authored with Claude Code.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20081
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 2 Pending, 1 Unclassified FailureAs of commit 05df518 with merge base a1649b9 ( NEW FAILURE - The following job has failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
The avg_pool2d scratch buffer validation was hardcoding M55 instead of using the cortex_m_target fixture, causing a mismatch when running against non-MVE targets. The small-magnitude linear implementation test was not wired to the fixture at all, so it always looked for the M55 runner. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
lgtm |
Summary
Add an explicit --cortex-m-target pytest option (conftest, defaulting to cortex-m55) for the op tests. Implementation tests take the target as a parametrized fixture, so it appears in the test id and drives both the AoT config and the matching per-target FVP runner; dialect tests stay target-agnostic since their graph output does not depend on the target.
A new reusable workflow (_test_cortex_m_ops.yml) builds the runner for each target and runs only the implementation tests against it; trunk.yml invokes it for cortex-m7 and cortex-m0plus. cortex-m55 coverage continues to run on pull via the existing job.
Test plan
CI
Authored with Claude Code.