Arm backend: Add support for single input matmul (#10654)
### Summary
AnnotateDecomposedMatmul makes sure that a decomposed matmul will two
dq-nodes before and a q-node after it's mm/bmm-node. Previously it
assumed that the partition always had two input nodes (two dq-nodes),
but this is not the case for a single input matmul, e.g. torch.matmul(x,
x). In such a case we must copy the dq-node and insert it before the
mm/bmm's two inputs.
```
Before pass:
-> expand -> view ->
/ \
x -> dq bmm -> view -> q
\ /
-> expand -> view ->
After pass:
-> expand -> view -> dq
/ \
x bmm -> q -> view
\ /
-> expand -> view -> dq
```
Signed-off-by: Oscar Andersson <oscar.andersson@arm.com> O
Oscar Andersson committed
62609215e08b1da2c8f6c6ae7e6958f935d28190
Parent: e88aafc
Committed by GitHub <noreply@github.com>
on 5/5/2025, 8:51:10 AM