TbeBatchMatmulElementWiseFusionPass

Description

Performs UB fusion on BatchMatMul/GEMM and ElemWise in the following pattern subgraphs.

Mode 1:

Mode 2:

Mode 3:

Restrictions

  • Dynamic shapes are not supported.
  • In mode 1, Elemwise supports only FusedMulAdd, Add, Div, RealDiv, Relu, and ReluGrad, while Elemwise1 supports only Add, Relu, and FusedMulAdd.
  • In mode 2, Elemwise supports only FusedMulAdd, Add, Div, RealDiv, Relu, and ReluGrad.
  • In mode 3, Elemwise supports only Mul, Elemwise1 supports only Mul, and Elemwise2 supports only Sigmoid.
  • BatchMatMul can be replaced by BatchMatMulV2.

Availability

Atlas 200/300/500 Inference Product

Atlas Training Series Product