Uh oh!
There was an error while loading. Please reload this page.
Arm backend: Add FuseViewCopyTransform and FuseConstantsPass in arm_pass_manager - #8997
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 <adrian.lundell@arm.com>
🔗 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 <adrian.lundell@arm.com>
kirklandsign
commented
Mar 7, 2025
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 |
zingo
commented
Mar 8, 2025
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. 🙏 |
zingo
commented
Mar 8, 2025
Created #9070 if still needed |
kirklandsign
commented
Mar 10, 2025
Hi @zingo We have the following internal error log: Do you have idea? |
kirklandsign
commented
Mar 10, 2025
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 |
AdrianLundell
commented
Mar 11, 2025
Hi @kirklandsign , can you give more context here:
|
kirklandsign
commented
Mar 11, 2025
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