Skip to content

Cortex-M: run op tests against a selectable target#20081

Merged
rascani merged 5 commits into
pytorch:mainfrom
rascani:cortex-m-op-tests-target-option
Jun 11, 2026
Merged

Cortex-M: run op tests against a selectable target#20081
rascani merged 5 commits into
pytorch:mainfrom
rascani:cortex-m-op-tests-target-option

Conversation

@rascani

@rascani rascani commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@pytorch-bot

pytorch-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure, 2 Pending, 1 Unclassified Failure

As of commit 05df518 with merge base a1649b9 (image):

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 6, 2026
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@rascani rascani marked this pull request as ready for review June 8, 2026 22:35
rascani and others added 3 commits June 9, 2026 17:05
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>
@psiddh

psiddh commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

lgtm

@rascani rascani merged commit c4b9b26 into pytorch:main Jun 11, 2026
485 of 489 checks passed
@rascani rascani deleted the cortex-m-op-tests-target-option branch June 11, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants