MaskedSoftmaxWithRelPosBiasFusionPass

Description

Fuses Mul, Add, Reshape, and Softmax that meet the following conditions into the MaskedSoftmaxWithRelPosBias operator.

Mode 1:

Mode 2:

Mode 3:

Mode 4:

Constraints

The input supports only four or five dimensions. Each fusion mode has the corresponding input shape, which is the base for constructing an operator. B, W, N, S1, and S2 indicate the dimensions of each shape, and scale indicates that the input is a scalar.

Applicable Products

Atlas inference products

Atlas A2 training products/Atlas A2 inference products

Atlas A3 training products/Atlas A3 inference products