Skip to content

Register a Cortex-M flow in the backend test suite - #21854

Open
rascani wants to merge 1 commit into
pytorch:mainfrom
rascani:cortex-m-suite-flow
Open

Register a Cortex-M flow in the backend test suite#21854
rascani wants to merge 1 commit into
pytorch:mainfrom
rascani:cortex-m-suite-flow

Conversation

@rascani

@rascani rascani commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The shared suite at backends/test/suite runs 23 torchvision and torchaudio models against every other major backend; Cortex-M had none, so its model coverage was hand-written one file at a time. This adds one, running on the Corstone-300 FVP. Five models pass and 15 are listed in CORTEX_M_SKIPS with a comment recording why each fails; read that list as a to-do. A pass means the model lowered and ran rather than that it was accurate, for the reason the module docstring gives.

The suite drives to_edge_transform_and_lower, so CortexMTester grows a stage of that name: to_edge with no partitioner followed by CortexMPassManager, since Cortex-M rewrites operators in place rather than delegating a subgraph. The flow converts 4D inputs to channels_last, without which CortexMConv2DCheck rejects every convolution in every model and raises the FVP timeout, which an ImageNet-sized model exceeds at the 120 second default.

Test plan

CI goes through test_backend.sh like every other backend, path-gated because every case installs the Arm toolchain, builds a runner and drives the FVP. The operator suite is excluded and the exclusion says why.

Authored with Claude Code.

The shared suite at backends/test/suite runs 23 torchvision and torchaudio
models against every other major backend; Cortex-M had none, so its model
coverage was hand-written one file at a time. This adds one, running on the
Corstone-300 FVP. Five models pass and 15 are listed in CORTEX_M_SKIPS with a
comment recording why each fails; read that list as a to-do. A pass means the
model lowered and ran rather than that it was accurate, for the reason the
module docstring gives.

The suite drives to_edge_transform_and_lower, so CortexMTester grows a stage of
that name: to_edge with no partitioner followed by CortexMPassManager, since
Cortex-M rewrites operators in place rather than delegating a subgraph. The flow
converts 4D inputs to channels_last, without which CortexMConv2DCheck rejects
every convolution in every model and raises the FVP timeout, which an
ImageNet-sized model exceeds at the 120 second default.

CI goes through test_backend.sh like every other backend, path-gated because
every case installs the Arm toolchain, builds a runner and drives the FVP. The
operator suite is excluded and the exclusion says why.

Authored with Claude Code.
@pytorch-bot

pytorch-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21854

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 Unclassified Failures

As of commit 618ffb1 with merge base d18ca0f (image):

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures 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 Aug 14, 2026
@github-actions

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant