Skip to content

Cortex-M: avoid redundant convolution and pooling work - #22859

Merged
rascani merged 1 commit into
mainfrom
gh/rascani/42/head
Sep 16, 2026
Merged

rascani merged 1 commit into
mainfrom
gh/rascani/42/head

Conversation

@rascani

@rascani rascani commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

For MVE convolutions with one input channel and more than eight output channels, emit regular-convolution weights at export. CMSIS-NN already repacks these depthwise weights and runs regular convolution on each inference, so this avoids repeated conversion and its temporary storage. Preserve depthwise dispatch for scalar/DSP and smaller channel counts. Also omit empty average-pooling pads.

Update DS-CNN's convolution and padding expectations and cover the MVE dispatch threshold and pooling cases.

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

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

✅ No Failures

As of commit f420caa 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
@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.

@rascani
rascani marked this pull request as ready for review September 16, 2026 17:29
rascani added a commit that referenced this pull request Sep 16, 2026
For MVE convolutions with one input channel and more than eight output channels, emit regular-convolution weights at export. CMSIS-NN already repacks these depthwise weights and runs regular convolution on each inference, so this avoids repeated conversion and its temporary storage. Preserve depthwise dispatch for scalar/DSP and smaller channel counts. Also omit empty average-pooling pads.

Update DS-CNN's convolution and padding expectations and cover the MVE dispatch threshold and pooling cases.

Authored with AI assistance from Codex.


ghstack-source-id: 5910700
ghstack-comment-id: 5689270859
Pull-Request: #22859
@rascani
rascani merged commit 169df81 into main Sep 16, 2026
223 of 226 checks passed
@rascani
rascani deleted the gh/rascani/42/head branch September 16, 2026 19:06
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.

2 participants