Skip to content

Arm backend: Legalize unsigned RESCALE from wide inputs - #21393

Merged
bdemirb merged 2 commits into
pytorch:mainfrom
bdemirb:baris/split-unsigned-rescale-upstream
Jul 27, 2026
Merged

Arm backend: Legalize unsigned RESCALE from wide inputs#21393
bdemirb merged 2 commits into
pytorch:mainfrom
bdemirb:baris/split-unsigned-rescale-upstream

Conversation

@bdemirb

@bdemirb bdemirb commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

TOSA RESCALE only allows output_unsigned when the input is int8 or int16. Some preserved uint8 IO paths can produce a final wide accumulator RESCALE with output_unsigned set, which newer model-converter builds reject.

Canonicalize that case during TOSA serialization by emitting a signed RESCALE to the target integer dtype first, followed by a legal signed-input to unsigned-output boundary RESCALE.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

TOSA RESCALE only allows output_unsigned when the input is int8 or
int16. Some preserved uint8 IO paths can produce a final wide
accumulator RESCALE with output_unsigned set, which newer
model-converter builds reject.

Canonicalize that case during TOSA serialization by emitting a signed
RESCALE to the target integer dtype first, followed by a legal
signed-input to unsigned-output boundary RESCALE.

Change-Id: Ia980ad42ecae62bf921fee6a64e2f1e7824f2632
Signed-off-by: Baris Demir <baris.demir@arm.com>
@bdemirb
bdemirb requested a review from digantdesai as a code owner July 27, 2026 09:02
@pytorch-bot

pytorch-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit a49664c with merge base fa4508e (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 27, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jul 27, 2026
@bdemirb

bdemirb commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot label "partner: arm"

@bdemirb

bdemirb commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot label "release notes: arm"

@pytorch-bot pytorch-bot Bot added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate labels Jul 27, 2026

@robell robell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved - has had internal code review.

@bdemirb
bdemirb merged commit 69014b6 into pytorch:main Jul 27, 2026
505 of 515 checks passed
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. module: arm Issues related to arm backend partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants