AscendQuant

Description

Performs quantization on the input x. The sizes of scale and offset must be equal to the last dimension of x or equal to 1.

Input

x: input tensor of type float16 or float. The data format is ND.

Attribute

  • offset: float.
  • scale: float.
  • sqrt_mode: bool.
  • round_mode: string.

Output

y: tensor of type int8. The data format is ND.

Constraints

Atlas inference products do not support scale, offset, and x of bfloat16.

ONNX Opset Support

Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18/v19/v20/v21/v22