MatMulReshapeBiasAddFusionPass

Description

Applies a Reshape operation to the output of the MatMul operator, followed by a BiasAdd/Add operation on the reshaped output.

Constraints

  • MatMul/MatMulV2 can have only two inputs.
  • The input of BiasAdd/Add must be the outputs of Bias and Reshape.
  • The Reshape node cannot split the tail axis of the MatMul output.
  • The shape of BiasAdd/Add is the tail axis of the MatMul output.
  • This fusion pattern takes effect only in the static graph mode.

Applicable Products

Atlas A2 training products/Atlas A2 inference products

Atlas A3 training products/Atlas A3 inference products

Ascend 950PR/Ascend 950DT