Skip to content

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

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

Cortex-M: add opt-in explicit layout lowering#21967
rascani wants to merge 8 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.

❌ 1 New Failure, 9 Unrelated Failures, 1 Unclassified Failure

As of commit 83ec2a7 with merge base 8b93850 (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:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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