Skip to content
heliaCORE
API reference
HELIA HUB

Quantization Functions:

Machine-readable model

function

Widen a float16 vector to float32.

Include/arm_nnfunctions_flt.h:4174

arm_cmsis_nn_status arm_dequantize_f16_f32(const float16_t *input, float32_t *output, int32_t block_size)

Widen a float16 vector to float32.

Gives what the hardware half-to-single conversion gives for each element: with FPSCR.AHP clear, finite values, subnormals (normal in float32), +/-0 and +/-Inf convert exactly. No accumulation, no rounding. Implemented by arm_dequantize_f16_bits_f32(), whose documentation gives the NaN and FPSCR behavior of each path (a NaN keeps its sign and payload). Input and output must not overlap. Serves the f16-weights DEQUANTIZE op (kws_float_fp16_weights).

Parameters of arm_dequantize_f16_f32
NameTypeDirectionDescription
inputconst float16_t *inPointer to the float16 input vector.
outputfloat32_t *outPointer to the float32 output vector.
block_sizeint32_tinNumber of elements (0 is a no-op).
Returns of arm_dequantize_f16_f32
Description
`ARM_CMSIS_NN_SUCCESS`, or `ARM_CMSIS_NN_ARG_ERROR` when `block_size` is negative or a pointer is NULL with a non-zero `block_size`.