BatchMatMul2MulFusionPass
Description
MatMul/MatMulv2/MatMulV3/BatchMatmul/BatchMatMulV2/BatchMatMulV3 operators with k=1 exist in the network, and the performance is poor. This graph fusion converts MatMul/MatMulv2/MatMulV3/BatchMatmul/BatchMatMulV2/BatchMatMulV3 into mul to solve the performance problem.
For

If the input adj is set to true, insert the reshape operator before the input.

Constraints
- It applies only to static scenarios. The input does not contain bias.
- The dtype meets the following conditions:
- Float32 for both input and output
- Float16 or BFloat16 for both input and output
Applicable Products
Parent topic: Graph Fusion Patterns