ScopeDynamicGRUPass

Description

Fuses a scope containing the following operators into a DynamicGRU operator: The scope includes five AddV2 operators, three Mul operators, and one Tanh operator, and does not contain Transpose operators.

Scope Details

See the following scope example.

The while scope contains five AddV2 operators, three Mul operators, one Tanh operator, and does not contain Transpose operators. After fusion, all operators in the red box are fused into one DynamicGRU operator.

Result Operator Prototype

DynamicGRUV2. For details, see Operator Acceleration Library API Reference.

Fusion Mapping

The input of TensorArrayUnstack/TensorArrayScatter/TensorArrayScatterV3 is used as the first input of the fused operator.

The input of while/ReadVariableOp_1/Enter is used as the second input of the fused operator.

The input of while/ReadVariableOp_4/Enter is used as the third input of the fused operator.

The input of while/ReadVariableOp_00/Enter is used as the fourth input of the fused operator.

The input of while/ReadVariableOp_01/Enter is used as the fifth input of the fused operator.

The output of TensorArrayStack/TensorArrayGatherV3 is used as the first output of the fused operator.

Applicable Network

DeepSpeech2

Fusion Pattern Type

Non-general fusion pattern