Arm backend: Add FuseViewCopyTransform and FuseConstantsPass in arm_pass_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> A
Adrian Lundell committed
3a7c23172c2f2895df5a30ca2db290cd65efd56e
Parent: d3cca89
Committed by GitHub <noreply@github.com>
on 3/6/2025, 10:47:32 AM