-
Notifications
You must be signed in to change notification settings - Fork 536
Arm backend: Add FuseViewCopyTransform and FuseConstantsPass in arm_pass_manager #8997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
These passes both removes redundant ops from the graph: - FuseViewCopyTransform pass is added from backends/transforms to merge sequential view ops. - FuseConstantOpsPass is created to compute ops with constant inputs AOT - This is not done in cases where the result is a larger tensor, to avoid increasing the constant memory size. - For BI, ops are quantized with the q/dq-ops as to not change the behaviour of the graph. - Pass order is important: the pass must be placed after all passes which may add constant ops, but before the InsertTableOpsPass, since it doesn't handle TOSA _table-ops. Change-Id: I855b2cd969dce24ad6d3c21d9a3f5473ddc984b8 Signed-off-by: Adrian Lundell <[email protected]>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8997
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9d82c07 with merge base d3cca89 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ass_manager (#8997) Add FuseViewCopyTransform and FuseConstantsPass in arm_pass_manager These passes both removes redundant ops from the graph: - FuseViewCopyTransform pass is added from backends/transforms to merge sequential view ops. - FuseConstantOpsPass is created to compute ops with constant inputs AOT - This is not done in cases where the result is a larger tensor, to avoid increasing the constant memory size. - For BI, ops are quantized with the q/dq-ops as to not change the behaviour of the graph. - Pass order is important: the pass must be placed after all passes which may add constant ops, but before the InsertTableOpsPass, since it doesn't handle TOSA _table-ops. Signed-off-by: Adrian Lundell <[email protected]>
Sorry @zingo would you mind if we revert and land this again from internal? This is breaking our internal tests. cc @zonglinpeng do you think a forward fix is possible? |
I'm not familiar with arm passes. But based on the error message |
Of course, if there is a problem let's revert so it works again, and we can figure out the problem much calmer. Unfortunately I'm not at my desk right now so I cannot do it right now. Feel free to go ahead if you can. 🙏 |
Created #9070 if still needed |
Hi @zingo We have the following internal error log:
Do you have idea? |
Hi @zingo Seems that all 3 models in this test https://github.com/pytorch/executorch/blob/main/backends/arm/test/passes/test_fuse_constant_ops_pass.py#L110-L115 failed |
Hi @kirklandsign , can you give more context here:
|
Sorry I don't have the full context about how the CI is run on our internal CI. Maybe @digantdesai will give more context. I'm not sure why tosa_reference_model is none here. |
These passes both removes redundant ops from the graph:
InsertTableOpsPass, since it doesn't handle TOSA _table-ops.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218