MatmulReshapeFusionPass

Description

Adds a Reshape node to the second input when the N axis of Matmul equals 1.

Restrictions

  • The fusion pattern is disabled by default. You can enable it by referring to Enabling/Disabling Fusion Patterns.
  • Only the static shape scenario is supported.
  • Supported data types: BFLOAT16, FLOAT16, and FLOAT32.
  • The input of x1 is [M, K]. The input of x2 is not transposed, and since N=1 is on the last axis, the x2 input is [K, 1].
  • The fusion pattern takes effect when the data type is BFLOAT16 or FLOAT16, and K is less than 27392.
  • This fusion pattern does not take effect when the data type is BFLOAT16 or FLOAT16, 8 ≤ K ≤ 64, and M ≥ 8192.
  • This fusion pattern does not take effect when the data type is BFLOAT16 or FLOAT16, K is greater than 12800, and M is greater than 16384.
  • The fusion pattern does not take effect when the data type is FLOAT32, 8 ≤ K ≤ 64, and 8192 ≤ M ≤ 32768.
  • This fusion pattern does not take effect when the data type is FLOAT32, M = 9, or K = 23697 or 27167.

Availability

Atlas A2 training product/Atlas A2 inference product

Atlas A3 training product/Atlas A3 inference product

Atlas 350 Accelerator Card