Skip to content
heliaAOT
HELIA HUB

quantization

Machine-readable model

class

Fixed-point form of a real-valued rescale factor.

helia_aot/air/quantization.py:7

AirFixedPointScale()

Fixed-point form of a real-valued rescale factor.

The pair reproduces a real multiplier as x * real ~ (x * multiplier) >> (31 - shift), where multiplier is a Q31 value (see quantize_multiplier). Following the CMSIS-NN convention, a positive shift is applied as a left shift before the Q31 multiply and a negative one as a right shift after it.

class

Blockwise quantization details.

helia_aot/air/quantization.py:39

AirBlockwiseQuantization()

Blockwise quantization details.

class

Parameters for quantization of a tensor.

helia_aot/air/quantization.py:48

AirQuantizationParameters()

Parameters for quantization of a tensor.

attribute

scales

Python

Per-tensor or per-channel scales; raises if the tensor is not quantized.

helia_aot/air/quantization.py:65

scales: list[float]

Per-tensor or per-channel scales; raises if the tensor is not quantized.

attribute

Per-tensor or per-channel zero points; raises if the tensor is not quantized.

helia_aot/air/quantization.py:72

zero_points: list[int]

Per-tensor or per-channel zero points; raises if the tensor is not quantized.