Skip to content

Lower branched A16W8 convs on U55 (#22566) - #22566

Open
apullin wants to merge 1 commit into
pytorch:mainfrom
apullin:export-D118736607
Open

Lower branched A16W8 convs on U55 (#22566)#22566
apullin wants to merge 1 commit into
pytorch:mainfrom
apullin:export-D118736607

Conversation

@apullin

@apullin apullin commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary:

A16W8 convolution rewriting can expose one INT48 accumulator to multiple output RESCALE nodes. Regor cannot materialize INT48 on U55 and can only fuse one output quantization into each convolution, so these graphs fail compilation before scheduling.

This fixes a U55 lowering regression introduced by #21910: its A16W8 output branching can leave one INT48 convolution accumulator feeding multiple RESCALE paths, but Regor cannot materialize INT48 and can fold only one RESCALE into a convolution.

Deduplicate identical complete RESCALE plus layout-permute heads, then clone the TOSA convolution for each remaining distinct output quantization while sharing its input, weight, and bias nodes. Mark those exact-semantics clones so later duplicate-user cleanup cannot merge the unsupported fanout back together.

Add structural, duplicate-fusion barrier, and true U55 compilation regressions. This change was authored with Codex.

Differential Revision: D118736607

@apullin
apullin requested a review from digantdesai as a code owner September 4, 2026 15:46
@pytorch-bot

pytorch-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures, 1 Pending, 1 Unrelated Failure

As of commit 193e773 with merge base 4ce2ec2 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 4, 2026
@meta-codesync

meta-codesync Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@apullin has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118736607.

@github-actions

github-actions Bot commented Sep 4, 2026

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.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repair matches the U55 constraint: deduplicate truly identical RESCALE→PERMUTE heads first, then clone the INT48-producing convolution only for semantically distinct quantisation heads. Marking the clones against later duplicate-user fusion is important, otherwise a later cleanup can recreate the unsupported fanout. The signature and unknown-user guards keep the rewrite conservative.

@apullin
apullin force-pushed the export-D118736607 branch 3 times, most recently from f72f672 to 4b87911 Compare September 4, 2026 17:43
@meta-codesync meta-codesync Bot changed the title Lower branched A16W8 convs on U55 Lower branched A16W8 convs on U55 (#22566) Sep 4, 2026
apullin added a commit to apullin/executorch that referenced this pull request Sep 4, 2026
Summary:

A16W8 convolution rewriting can expose one INT48 accumulator to multiple output `RESCALE` nodes. Regor cannot materialize INT48 on U55 and can only fuse one output quantization into each convolution, so these graphs fail compilation before scheduling.

This fixes a U55 lowering regression introduced by pytorch#21910: its A16W8 output branching can leave one INT48 convolution accumulator feeding multiple `RESCALE` paths, but Regor cannot materialize INT48 and can fold only one `RESCALE` into a convolution.

Deduplicate identical complete `RESCALE` plus layout-permute heads, then clone the TOSA convolution for each remaining distinct output quantization while sharing its input, weight, and bias nodes. Mark those exact-semantics clones so later duplicate-user cleanup cannot merge the unsupported fanout back together.

Add structural, duplicate-fusion barrier, and true U55 compilation regressions. This change was authored with Codex.

Differential Revision: D118736607
apullin added a commit to apullin/executorch that referenced this pull request Sep 4, 2026
Summary:

A16W8 convolution rewriting can expose one INT48 accumulator to multiple output `RESCALE` nodes. Regor cannot materialize INT48 on U55 and can only fuse one output quantization into each convolution, so these graphs fail compilation before scheduling.

This fixes a U55 lowering regression introduced by pytorch#21910: its A16W8 output branching can leave one INT48 convolution accumulator feeding multiple `RESCALE` paths, but Regor cannot materialize INT48 and can fold only one `RESCALE` into a convolution.

Deduplicate identical complete `RESCALE` plus layout-permute heads, then clone the TOSA convolution for each remaining distinct output quantization while sharing its input, weight, and bias nodes. Mark those exact-semantics clones so later duplicate-user cleanup cannot merge the unsupported fanout back together.

Add structural, duplicate-fusion barrier, and true U55 compilation regressions.

Differential Revision: D118736607
@apullin

apullin commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Local lint stepped on a bunch of comments and unrelated code. Should be cleaned up now, for just the relevant changes.

@meta-codesync meta-codesync Bot changed the title Lower branched A16W8 convs on U55 (#22566) Lower branched A16W8 convs on U55 Sep 5, 2026
@meta-codesync meta-codesync Bot changed the title Lower branched A16W8 convs on U55 Lower branched A16W8 convs on U55 (#22566) Sep 6, 2026
apullin added a commit to apullin/executorch that referenced this pull request Sep 6, 2026
Summary:

A16W8 convolution rewriting can expose one INT48 accumulator to multiple output `RESCALE` nodes. Regor cannot materialize INT48 on U55 and can only fuse one output quantization into each convolution, so these graphs fail compilation before scheduling.

This fixes a U55 lowering regression introduced by pytorch#21910: its A16W8 output branching can leave one INT48 convolution accumulator feeding multiple `RESCALE` paths, but Regor cannot materialize INT48 and can fold only one `RESCALE` into a convolution.

Deduplicate identical complete `RESCALE` plus layout-permute heads, then clone the TOSA convolution for each remaining distinct output quantization while sharing its input, weight, and bias nodes. Mark those exact-semantics clones so later duplicate-user cleanup cannot merge the unsupported fanout back together.

Add structural, duplicate-fusion barrier, and true U55 compilation regressions. This change was authored with Codex.

Differential Revision: D118736607
Summary:

A16W8 convolution rewriting can expose one INT48 accumulator to multiple output `RESCALE` nodes. Regor cannot materialize INT48 on U55 and can only fuse one output quantization into each convolution, so these graphs fail compilation before scheduling.

This fixes a U55 lowering regression introduced by pytorch#21910: its A16W8 output branching can leave one INT48 convolution accumulator feeding multiple `RESCALE` paths, but Regor cannot materialize INT48 and can fold only one `RESCALE` into a convolution.

Deduplicate identical complete `RESCALE` plus layout-permute heads, then clone the TOSA convolution for each remaining distinct output quantization while sharing its input, weight, and bias nodes. Mark those exact-semantics clones so later duplicate-user cleanup cannot merge the unsupported fanout back together.

Add structural, duplicate-fusion barrier, and true U55 compilation regressions. This change was authored with Codex.

Differential Revision: D118736607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported module: arm Issues related to arm backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants