Optimize FuseViewCopyTransform pass#20591
Open
Erik-Lundell wants to merge 1 commit into
Open
Conversation
This is an optimizing and refactoring patch targeting the FuseViewCopyTransform pass. Prior to this patch, the pass worked in two full iterations and recompilations of the graph: The first iteration updated view nodes, recompiled the graph and the second iteration removed any redundant view nodes. Optimize this pass to instead do the same work in just one graph iteration and compilation. The pass now works by finding fusible chains, removing redundant view nodes, and form updated node edges within a single iteration. The table below shows the improvement when lowering models on a computer using the TOSA FP profile. | Model | Before | After | Fuse delta | Total delta | |--------------|-------:|------:|----------------:|------------:| | mobilenet_v2 | 3.21s | 1.61s | -1.61s / -50.0% | -2.7% | | deit_tiny | 10.51s | 5.27s | -5.24s / -49.9% | -1.6% | | swin2sr | 2.55s | 1.26s | -1.29s / -50.7% | -1.2% | Signed-off-by: Martin Lindström <Martin.Lindstroem@arm.com> Change-Id: Id8a9640814c3f146323f14a64c5a4a857273eed0
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20591
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit d33e80a with merge base f11805c ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
zingo
approved these changes
Jun 29, 2026
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.
This is an optimizing and refactoring patch targeting the FuseViewCopyTransform pass.
Prior to this patch, the pass worked in two full iterations and recompilations of the graph: The first iteration updated view nodes, recompiled the graph and the second iteration removed any redundant view nodes.
Optimize this pass to instead do the same work in just one graph iteration and compilation. The pass now works by finding fusible chains, removing redundant view nodes, and form updated node edges within a single iteration.
The table below shows the improvement when lowering models on a computer using the TOSA FP profile.
Signed-off-by: Martin Lindström Martin.Lindstroem@arm.com
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani