Skip to content

Cortex-M: add opt-in explicit layout lowering - #21967

Draft
rascani wants to merge 9 commits into
gh/rascani/12/headfrom
gh/rascani/13/head
Draft

Cortex-M: add opt-in explicit layout lowering#21967
rascani wants to merge 9 commits into
gh/rascani/12/headfrom
gh/rascani/13/head

Conversation

@rascani

@rascani rascani commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thread an experimental explicit-layout mode through the shared Edge compile
configuration, AOT compiler, quantizer, tester, and pass manager while retaining
legacy dim-order export as the default.

Explicit mode disables dim-order operators, converts Conv1d through the common
transform, runs the common channels-last pipeline, lowers anchors to the fixed
_nhwc schemas, and lowers surviving boundaries to cortex_m transpose. Output
dequantization remains a layout barrier, and unequal-shape add or multiply stays
outside the region until separately admitted.

Remove identity clones once qparams are folded, so explicit mode does not need a
second clone operator in the selective build. The pass has to run after folding:
removing clones first changes the quantize topology the fold matches and splits
the layout region in two.

Package the host test harness and assert expected Cortex-M targets before
planned-memory comparisons.

Local Corstone-300 run of the full Cortex-M suite, the common-transform suites,
and lintrunner. Not run on Cortex-M33.

Authored with Codex.

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 336 Pending

As of commit be00e2c with merge base 2c88f57 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
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. module: arm Issues related to arm backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant