dequantize
Classes
DequantizeOperator
DequantizeOperator(op: AirOperator, model: AirModel, platform: SocPlatform, prefix: str = 'aot', attributes: dict[str, str] = {})
DEQUANTIZE operator.
This operator converts a quantized tensor to a float tensor.
Supported inputs: INT8, INT16, FLOAT16 (output must be FLOAT32).
Parameters:
-
(opAirOperator) –The AIR operator to wrap.
-
(modelAirModel) –The AIR model.
-
(platformSocPlatform) –The target platform for code generation.
-
(prefixstr, default:'aot') –Prefix for generated code files. Defaults to "aot".
-
(attributesdict[str, str], default:{}) –Attributes for template values. Defaults to {}.
Functions
cmsis_float_dependencies
DEQUANTIZE's float dependency is limited to the native FP16 cast path.
DEQUANTIZE never calls a gated float kernel: arm_dequantize_s8_f32 /
arm_dequantize_s16_f32 live in the ungated arm_nnfunctions.h and
emit into a plain float buffer. The only path that touches the
float-only ns-cmsis-nn API is the native FP16 input cast (available
only on Armv8.1-M FP16 cores), which binds the input as float16_t —
a type introduced by arm_nnfunctions_flt.h behind
ARM_NN_ENABLE_F16. The portable FP16->FP32 widening path used on
non-FP16 cores works purely on uint16_t bit patterns and therefore
declares no dependency.
Returns:
compute_values
emit
Generate the source code for the operator.
Parameters:
-
(save_pathPath) –Path to save the generated code.