Input and output

RMS_NORM_NORM DYNAMIC_QUANT

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16

ND

The size of the last dimension n must be 32-byte aligned and less than or equal to 12288.

gamma

[dim_n]

float16

ND

The size of the last dimension n must be 32-byte aligned and less than or equal to 12288.

beta

[dim_n]

float16

ND

The size of the last dimension n must be 32-byte aligned and less than or equal to 12288.

output

[dim_0, dim_1, ..., dim_n]

int8

ND

The size of the last dimension n must be 32-byte aligned and less than or equal to 12288.

scale

[dim_0, dim_1, ..., dim_n-1]

float

ND

Output when quantType = = QUANT_INT8 and dynamicQuantType! = DYNAMIC_QUANT_UNDEFINED.

offset

[dim_0, dim_1, ..., dim_n-1]

float

ND

Valid when quantType == QUANT_INT8 and dynamicQuantType == DYNAMIC_QUANT_ASYMMETRIC.

Not supported in the current version.

When quantType is set to INT8, the size of the last dimension n of other tensors must be a multiple of 32, except the scale, offset, and rstd parameters.

The setting of dynamicQuantType takes effect only when quantType is set to INT8.

RMS_NORM_POSTNORM quantType = QUANT_INT8

Parameter

Dimension

Data Type

Format

Description

x

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Input tensor 0. The size of the last dimension must be a multiple of 32. The size of n of the last dimension of all tensors must be the same.

residual

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Input tensor 1. The size of the last dimension must be a multiple of 32.

gamma

[dim_n]/[1, dim_n]

float16/bf16

ND

Input tensor 2. The size of the last dimension must be a multiple of 32.

scale

[1]

float16/bf16

ND

Input tensor 3. Quantization scale.

offset

[1]

int8

ND

Input tensor 4. Quantization offset.

outputQuant

[dim_0, dim_1, ..., dim_n]

int8

ND

Output tensor 0. The number of dimensions and the value of each dimension are the same as those of x. The size of the last dimension must be a multiple of 32.

output

[dim_0, dim_1, ..., dim_n]

float16/bf16

ND

Output tensor 1. The number of dimensions and the value of each dimension are the same as those of x. The size of the last dimension must be a multiple of 32.

Except the scale and offset parameters, the size of the last dimension n of other tensors must be the same.