Skip to content

Cortex-M: size scratch buffers in a dedicated pass - #22860

Draft
rascani wants to merge 1 commit into
gh/rascani/42/headfrom
gh/rascani/43/head
Draft

rascani wants to merge 1 commit into
gh/rascani/42/headfrom
gh/rascani/43/head

Conversation

@rascani

@rascani rascani commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Move CMSIS-NN scratch allocation sizing out of AtenToCortexMPass into InitializeScratchBuffersPass. Run it immediately after dialect lowering in both default pipelines. This lets later graph rewrites, such as padding fusion, run before sizing without embedding them in dialect conversion.

Preserve target-specific sizing, metadata updates and validation of trailing allocation nodes. Recompile after changing allocation arguments. Explicit custom pipelines that perform dialect lowering must include the sizing pass before memory planning. The extraction is independently reviewed; existing convolution, pooling, layout and DS-CNN dialect tests exercise both pipelines.

Authored with AI assistance from Codex.

[ghstack-poisoned]
@rascani

rascani commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

@pytorch-bot

pytorch-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 57305bb with merge base 026ca3f (image):
💚 Looks good so far! There are no failures yet. 💚

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 Sep 15, 2026
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