71typedef enum : int32_t {
112ra8_npu_quantize_i8(
const float* in, int8_t* out,
size_t count,
float scale, int32_t zero_point);
179ra8_npu_quantize_u8(
const float* in, uint8_t* out,
size_t count,
float scale, int32_t zero_point);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_npu_dequantize_u8(const uint8_t *in, float *out, size_t count, float scale, int32_t zero_point)
Dequantize a UINT8 tensor into a float arena (affine).
ra8_npu_quant_range_t
Saturation bounds of the supported quantized element types.
@ k_ra8_npu_quant_i8_min
INT8 lower saturation bound.
@ k_ra8_npu_quant_u8_max
UINT8 upper saturation bound.
@ k_ra8_npu_quant_i8_max
INT8 upper saturation bound.
@ k_ra8_npu_quant_u8_min
UINT8 lower saturation bound.
ra8_err_t ra8_npu_quantize_i8(const float *in, int8_t *out, size_t count, float scale, int32_t zero_point)
Quantize a float arena into an INT8 tensor (affine, saturating).
ra8_err_t ra8_npu_quantize_u8(const float *in, uint8_t *out, size_t count, float scale, int32_t zero_point)
Quantize a float arena into a UINT8 tensor (affine, saturating).
ra8_err_t ra8_npu_dequantize_i8(const int8_t *in, float *out, size_t count, float scale, int32_t zero_point)
Dequantize an INT8 tensor into a float arena (affine).