Skip to content

Cortex-M: make quantized add and multiply layout-agnostic - #21966

Closed
rascani wants to merge 14 commits into
gh/rascani/20/headfrom
gh/rascani/12/head
Closed

rascani wants to merge 14 commits into
gh/rascani/20/headfrom
gh/rascani/12/head

Conversation

@rascani

@rascani rascani commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Derive the channel-broadcast repeat length from the broadcast operand's element
count instead of a hard-coded channel dimension, so one pair of operators serves
both the legacy NCHW-logical channels-last contract and the NHWC-logical
contiguous one.

The kernels already read identical bytes under either contract; only the shape
metadata placed channels at a different index. Consult the dim order of the
larger operand rather than sniffing the shape, which stays correct when the
broadcast operand's unit dimensions leave its own dim order ambiguous. The
quantizer keeps asking the logical NCHW question it asked before, since it runs
ahead of any layout transform.

Cortex-M55 FVP add and multiply suites, the explicit-NHWC runtime cases, host
layout-parity coverage comparing both contracts through one operator, and
lintrunner.

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

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

❌ 4 Cancelled Jobs

As of commit 214083e with merge base 469debd (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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]
[ghstack-poisoned]
[ghstack-poisoned]

This branch was previously deployed

1 inactive deployment
cadence — 214083e6 Deployed Aug 25, 2026 by rascani
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