Skip to content

Cortex-M: fuse SAME padding into quantized convolutions - #22861

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

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

Conversation

@rascani

@rascani rascani commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Explicit SAME padding adds an int8 pad operation before convolution. Fuse supported zero-filled SAME_UPPER padding into regular and depthwise Cortex-M operators in both layout pipelines. Preserve shared pad outputs and keep the unsupported MVE 1xN case explicit. Include the MLPerf zero-pad expectations with this change.

Run FuseConvPaddingPass after dialect conversion and before scratch sizing. In the explicit-layout pipeline, propagate layouts before canonicalizing singleton permutations into views, which would hide the padding pattern. One cleanup/canonicalization pair suffices.

Validate four-value padding geometry at export time and use the planned output dimensions for trailing padding. Runtime uses the existing argument validation with support for either two or four padding values; it does not recalculate padding geometry.

Targeted Python and M55 FVP tests cover both layouts, shared pad outputs, regular/grouped/depthwise convolution and the unsupported 1xN fallback. Independent review checked the runtime-check removal and the layout ordering.

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/22861

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

✅ No Failures

As of commit 4859b8e 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