Skip to content

Fix DS-CNN Cortex-M input memory format - #21485

Open
JacobSzwejbka wants to merge 2 commits into
mainfrom
fix/ds-cnn-cortex-m-channels-last
Open

Fix DS-CNN Cortex-M input memory format#21485
JacobSzwejbka wants to merge 2 commits into
mainfrom
fix/ds-cnn-cortex-m-channels-last

Conversation

@JacobSzwejbka

Copy link
Copy Markdown
Contributor

Summary

The shared DS-CNN model wrapper returned a contiguous NCHW example input, while the Cortex-M backend requires channels-last inputs. This caused the nightly Cortex-M FVP run to abort in cortex_m::quantized_depthwise_conv2d.out with input must be channels_last.

Convert the example input to channels-last, matching the existing Cortex-M DS-CNN tests and backend contract. The tensor values and eager model output are unchanged.

Test plan

Ran python -m py_compile examples/models/mlperf_tiny/ds_cnn.py and git diff --check. Loaded the patched wrapper and verified input stride (490, 1, 10, 1), eager output shape (1, 12), and the exported user-input stride (490, 1, 10, 1).

Authored with Claude.

@pytorch-bot

pytorch-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 343d6d3 with merge base a1d4d35 (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 Jul 30, 2026
@JacobSzwejbka
JacobSzwejbka requested a review from rascani July 30, 2026 03:58
@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.

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