MulAddNPass
Description
Fuses multiple Mul nodes and the AddN node into one MulAddN node when the number of Mul nodes is greater than 2.

When the number of input nodes of AddN is 2, this fusion pattern fuses Mul and AddN into one FusedMulAddN node. One of the inputs of the Mul node must be a scalar or a tensor containing only one element.

Restrictions
- When the number of Mul nodes is greater than 2:
- In the dynamic shape scenario, the input x1 has shape [B, M, 1] and x2 has shape [B, 1, N].
- The maximum value of N in the shape of x2 is 2040.
- When the number of input nodes of AddN is 2:
- The input x3 must be either a scalar or a tensor containing only one element.
- The Mul node must serve as the first input of the AddN node. Otherwise, fusion is not performed.
Availability
Atlas 350 Accelerator Card
Parent topic: Graph Fusion Patterns