ConvConcatFusionPass

Description

Inserts a StridedWrite operator before the concat operator. The inserted StridedWrite, instead of the concat operator, will concatenate Conv2D memory to reduce the performance consumption caused by concat computation. Concat operators include ConcatD and ConcatV2D.

Scenario 1: Insert the StridedWrite operator.

Before: After:

Scenario 2: Match a subgraph that contains a Dequant node.

Before: After:

Scenario 3: If there is a Quant node after concat, the node is moved forward.

Before: After:

Scenario 4: The mish operator is moved downwards.

Before: After:

Scenario 5: If StridedWrite cannot be found in the operator information library, no insertion is performed. That is, the following figure does not change.

Restrictions

  • In the quantization scenario, the fusion pattern must be enabled. Otherwise, the output dtype of transdata is invalid.
  • The dynamic shape scenario is not supported.
  • If the original DType is fp16 or float, the value of dim C must be a multiple of 16. If the DType is int8, the value of dim C must be a multiple of 32. If the DType is int4, the value of dim C must be a multiple of 64.

Availability

Atlas 200/300/500 Inference Product

Atlas Training Series Product