Skip to content

Arm backend: regression test for equal non-simple IFM scale Add on Ethos-U55 (#21151)#21151

Open
3l1 wants to merge 1 commit into
mainfrom
export-D113307975
Open

Arm backend: regression test for equal non-simple IFM scale Add on Ethos-U55 (#21151)#21151
3l1 wants to merge 1 commit into
mainfrom
export-D113307975

Conversation

@3l1

@3l1 3l1 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary:

Add EqualScaleAdd (x + x) tests on Ethos-U55 and Ethos-U85. When both Add/Sub
operands share one equal, non-simple (non-power-of-2) scale, the Ethos-U55
equal-scale code path writes both scales into 16-bit OPA/OPB registers and the
wide value can overflow to zero, silently dropping an operand (x + x returns x,
i.e. the output is halved; softmax's Sub(x, max) loses an operand). Correct
lowering keeps the operand as an explicit rescale so the FVP result matches the
quantized reference.

The check is Ethos-U55-codegen-specific (it reproduces on the FVP, not on the
TOSA reference path). Non-power-of-2 input magnitudes force the non-simple equal
scale that triggers the overflow.

Reviewed By: rascani

Differential Revision: D113307975

@3l1
3l1 requested a review from digantdesai as a code owner July 22, 2026 22:15
@pytorch-bot

pytorch-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit fa7dd6c with merge base 3802831 (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 22, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jul 22, 2026
@meta-codesync

meta-codesync Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@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.

…hos-U55 (#21151)

Summary:

Add EqualScaleAdd (x + x) tests on Ethos-U55 and Ethos-U85. When both Add/Sub
operands share one equal, non-simple (non-power-of-2) scale, the Ethos-U55
equal-scale code path writes both scales into 16-bit OPA/OPB registers and the
wide value can overflow to zero, silently dropping an operand (x + x returns x,
i.e. the output is halved; softmax's Sub(x, max) loses an operand). Correct
lowering keeps the operand as an explicit rescale so the FVP result matches the
quantized reference.

The check is Ethos-U55-codegen-specific (it reproduces on the FVP, not on the
TOSA reference path). Non-power-of-2 input magnitudes force the non-simple equal
scale that triggers the overflow.

Reviewed By: rascani

Differential Revision: D113307975
@meta-codesync meta-codesync Bot changed the title Arm backend: regression test for equal non-simple IFM scale Add on Ethos-U55 Arm backend: regression test for equal non-simple IFM scale Add on Ethos-U55 (#21151) Jul 23, 2026
@meta-codesync
meta-codesync Bot force-pushed the export-D113307975 branch from d2d9cf5 to fa7dd6c Compare July 23, 2026 02:24
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