MatmulToGemmOpFusionPass

Fusion Patterns

  • Atlas A2 products: This fusion will perform operator conversion of MatMulV3/MatMulV2/MatMul operators that conform to graph fusion patterns into GemmV2 operators.
  • Atlas A3 products: This fusion will perform operator conversion of MatMulV3/MatMulV2/MatMul operators that conform to graph fusion patterns into GemmV2 operators.
  • Ascend 950PR&950DT products: This fusion will perform operator conversion of MatMulV3/MatMulV2/MatMul operators that conform to graph fusion patterns into GemmV3 operators.

Constraints

  • The Cast node between the MatMul and AssignAdd nodes can be absent; matching without the Cast node is supported.
  • The MatMul types include MatMul/MatMulV2/MatMulV3.
  • Input dtypes of the MatMul node:
    • Atlas A2 products: Only supports float16 and bfloat16.
    • Atlas A3 products: Only supports float16 and bfloat16.
    • Ascend 950PR&950DT products: Supports float16, float32, and bfloat16.
  • Input shapes of the MatMul node:
    • Atlas A2 products: Only supports shapes in the whitelist for fusion.
    • Atlas A3 products: Only supports shapes in the whitelist for fusion.
  • The input dtype of the AssignAdd node only supports float32.
  • Disabling this pass is not recommended. Doing so may affect network accuracy.

Applicable Products

Atlas A2 products

Atlas A3 products

Ascend 950PR&950DT products