Skip to content

Arm backend: Remove FuseConsecutiveRescalesPass#20146

Open
gggekov wants to merge 1 commit into
pytorch:mainfrom
gggekov:remove_FuseConsecutiveRescalesPass
Open

Arm backend: Remove FuseConsecutiveRescalesPass#20146
gggekov wants to merge 1 commit into
pytorch:mainfrom
gggekov:remove_FuseConsecutiveRescalesPass

Conversation

@gggekov

@gggekov gggekov commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

The FuseConsecutiveRescalesPass was destinated to
speed-up execution on Ethos-U55 by identifying
consequtive rescales that could be optimised and
eliminate them. However, since then the compiler has added support for advanced add/sub for the Ethos-U55. We no longer need to remove rescales for the U55,
hence removing this pass.

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

The FuseConsecutiveRescalesPass was destinated to
speed-up execution on Ethos-U55 by identifying
consequtive rescales that could be optimised and
eliminate them. However, since then the compiler has
added support for advanced add/sub for the Ethos-U55.
We no longer need to remove rescales for the U55,
hence removing this pass.

Signed-off-by: George Gekov <george.gekov@arm.com>
Change-Id: I6e15636f2ea46390cbebc8bb7e2ee2beb3f81512
Copilot AI review requested due to automatic review settings June 9, 2026 09:24
@gggekov gggekov requested a review from digantdesai as a code owner June 9, 2026 09:24
@pytorch-bot

pytorch-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit af07b09 with merge base 9898bc5 (image):

NEW FAILURES - The following jobs have failed:

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 Jun 9, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jun 9, 2026
@gggekov gggekov added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the Arm backend FuseConsecutiveRescalesPass (and its test coverage) from the lowering pipeline, along with associated references, based on the rationale that newer Ethos-U55 compiler support makes the optimization unnecessary.

Changes:

  • Deleted FuseConsecutiveRescalesPass implementation and removed it from the Arm pass pipeline.
  • Removed the dedicated rescale-optimization test file for the deleted pass.
  • Updated residual model test documentation to drop references to the removed pass.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
backends/arm/test/passes/test_rescale_optimization.py Removes tests that exclusively exercised the deleted FuseConsecutiveRescalesPass.
backends/arm/test/models/test_residual_conv_block.py Updates docstrings to remove outdated references to the deleted pass.
backends/arm/_passes/fuse_consecutive_rescales_pass.py Deletes the pass implementation entirely.
backends/arm/_passes/arm_pass_manager.py Removes the pass from the shared TOSA INT pipeline pass list.
backends/arm/_passes/init.py Removes the exported import of FuseConsecutiveRescalesPass.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 413 to 420
FuseDuplicateUsersPass(),
# TODO: DecomposeLinearPass should run after InsertRescaleInt32Pass or
# before FoldAndAnnotateQParamsPass but is unable to at the moment.
# Ticket: MLETORCH-1539
DecomposeLinearPass(),
InsertRescaleInt32Pass(),
FuseConsecutiveRescalesPass(),
InsertControlFlowRescalesPass(),
DecomposeQuantNodesPass(),
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants