Arm backend: Improve permute/view fusing#21055
Open
AdrianLundell wants to merge 1 commit into
Open
Conversation
Adds transpose counting to pixel-shuffle tests including a mixed precision case with decomposed Q/DQ nodes which the previous permute propagation did not handle. This is fixed by adding support for propagating views and permutes over across forks in the graph, as long as it can be proven that the branches will eventually converge. Also adds support for where to fuse_identiacal_input_transforms Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: If66ff26d8020cdeab9ea88bc87a687a63a57dda0
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21055
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Cancelled Job, 1 Unrelated FailureAs of commit 9526704 with merge base a19d1ba ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
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. |
rascani
approved these changes
Jul 21, 2026
| lambda arg: arg.meta["val"] if isinstance(arg, torch.fx.Node) else arg, | ||
| ) | ||
| node.meta["val"] = cast(Any, node.target)(*args, **kwargs) | ||
| except Exception: |
Contributor
There was a problem hiding this comment.
Is there any way to narrow this to expected Exception classes?
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.
Makes view/permutes always split to all branches of a node with multiple outputs for downward propagation. Note that this will never increase the number of permutes/views in the graph, since any non-fused permutes/views will propagate back and be fused together again by the upward propagation pass.
Adds support for where operator to fuse_identical_input_transforms
Replaces _would_strand_layout_op_on_wider_elements with MoveDataMovementOpsToSmallerDtypePass to allow ops to
propagate more freely during the fusing phase
Adds tosa ops to MatchArgsPass since it is run after some ops have been rewritten to TOSA.
Generalizes refresh_permute_view_meta into refresh_node_meta which works for any operators and uses that.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani