Arm backend: Rerun duplicate-user fusion after TOSA lowering#21041
Merged
YufengShi-dudu merged 1 commit intoJul 21, 2026
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21041
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit 5d9ab46 with merge base a19d1ba ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Late TOSA transformations can introduce equivalent operations after the first FuseDuplicateUsersPass invocation. Rerun it after TOSA and shape transformations, before output nodes are made unique. TOSA-FP operator comparisons: | Model | Before | After | Reduction | |--------------------|-------:|------:|----------:| | SD3 | 1,663 | 1,573 | 90 (5.4%) | | InceptionV3 | 762 | 746 | 16 (2.1%) | | Conformer delegate | 537 | 494 | 43 (8.0%) | All three reference-output tests pass with late fusion enabled. Add regression coverage for the late fusion and output uniqueness pass ordering. Change-Id: Ia4e2335e05b18d16b93c7e035a5502b8f050855c Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
YufengShi-dudu
force-pushed
the
rerun-deplicate-user-fusion
branch
from
July 21, 2026 08:29
4c0696c to
5d9ab46
Compare
AdrianLundell
approved these changes
Jul 21, 2026
metascroy
added a commit
that referenced
this pull request
Jul 21, 2026
…#21106) Reverts #21041 This change breaks executorch/backends/arm/test:addmm test_addmm_u55_INT[basic] on Corstone-300: the model output is all zeros instead of the reference [[2,4],[6,8]]. Root cause: running FuseDuplicateUsersPass after InsertRescalePass. In the [basic] case x1 and x3 are value-identical, so FuseEqualPlaceholdersPass merges them into a single placeholder that feeds both the matmul operand and the bias/add path. After rescale insertion, that shared producer has multiple tosa.RESCALE users, and fusing them corrupts the quantized addmm data flow, zeroing the output. Bisected to the late FuseDuplicateUsersPass insertion specifically (reordering EnsureUniqueOutputNodesPass is not the cause). cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Late TOSA transformations can introduce equivalent operations after the first FuseDuplicateUsersPass invocation. Rerun it after TOSA and shape transformations, before output nodes are made unique.
TOSA-FP operator comparisons:
All three reference-output tests pass with late fusion enabled.
Add regression coverage for the late fusion and output uniqueness pass ordering.
Change-Id: Ia4e2335e05b18d16b93c7e035a5502b8f050855c
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani