You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arm backend: Move rescales from SUM visitor to pass (#15299)
In the SUM node visitor, an INT8->INT32 RESCALE node is inserted prior
to the SUM node; similarly, an INT32->INT8 RESCALE node is inserted
after.
This patch moves the insertion to `InsertRescaleInt32Pass`. Since SUM is
decomposed, insertion of RESCALE nodes should be carried out before
`DecomposeSumPass` (which decomposes SUM into a chain of single dim
SUMs). The ordering is important to avoid redundant INT8/INT32 RESCALE
nodes being inserted between each SUM node in the chain after
decomposition. Only one INT8->INT32 RESCALE is needed before the chain,
and an INT32->INT8 after it; between the SUM nodes in the chain, the
edges are already in the correct INT32 data type.
### Test plan
Tests exercising the modified pass of this patch have been added to
backends/arm/test/passes/test_insert_rescale_i32_pass.py.
Signed-off-by: Martin Lindström <[email protected]>
0 commit comments