CMSIS-NN  Version 4.0.0
CMSIS NN Software Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SVDF Layer Functions

Functions

arm_cmsis_nn_status arm_svdf_s8 (const cmsis_nn_context *input_ctx, const cmsis_nn_context *output_ctx, const cmsis_nn_svdf_params *svdf_params, const cmsis_nn_per_tensor_quant_params *input_quant_params, const cmsis_nn_per_tensor_quant_params *output_quant_params, const cmsis_nn_dims *input_dims, const q7_t *input_data, const cmsis_nn_dims *state_dims, q7_t *state_data, const cmsis_nn_dims *weights_feature_dims, const q7_t *weights_feature_data, const cmsis_nn_dims *weights_time_dims, const q7_t *weights_time_data, const cmsis_nn_dims *bias_dims, const q31_t *bias_data, const cmsis_nn_dims *output_dims, q7_t *output_data)
 s8 SVDF function with 8 bit state tensor and 8 bit time weights More...
 
arm_cmsis_nn_status arm_svdf_state_s16_s8 (const cmsis_nn_context *input_ctx, const cmsis_nn_context *output_ctx, const cmsis_nn_svdf_params *svdf_params, const cmsis_nn_per_tensor_quant_params *input_quant_params, const cmsis_nn_per_tensor_quant_params *output_quant_params, const cmsis_nn_dims *input_dims, const q7_t *input_data, const cmsis_nn_dims *state_dims, q15_t *state_data, const cmsis_nn_dims *weights_feature_dims, const q7_t *weights_feature_data, const cmsis_nn_dims *weights_time_dims, const q15_t *weights_time_data, const cmsis_nn_dims *bias_dims, const q31_t *bias_data, const cmsis_nn_dims *output_dims, q7_t *output_data)
 s8 SVDF function with 16 bit state tensor and 16 bit time weights More...
 

Description

Function Documentation

arm_cmsis_nn_status arm_svdf_s8 ( const cmsis_nn_context input_ctx,
const cmsis_nn_context output_ctx,
const cmsis_nn_svdf_params svdf_params,
const cmsis_nn_per_tensor_quant_params input_quant_params,
const cmsis_nn_per_tensor_quant_params output_quant_params,
const cmsis_nn_dims input_dims,
const q7_t input_data,
const cmsis_nn_dims state_dims,
q7_t state_data,
const cmsis_nn_dims weights_feature_dims,
const q7_t weights_feature_data,
const cmsis_nn_dims weights_time_dims,
const q7_t weights_time_data,
const cmsis_nn_dims bias_dims,
const q31_t bias_data,
const cmsis_nn_dims output_dims,
q7_t output_data 
)
Parameters
[in]input_ctxTemporary scratch buffer The caller is expected to clear the buffer ,if applicable, for security reasons.
[in]output_ctxTemporary output scratch buffer The caller is expected to clear the buffer ,if applicable, for security reasons.
[in]svdf_paramsSVDF Parameters Range of svdf_params->input_offset : [-128, 127] Range of svdf_params->output_offset : [-128, 127]
[in]input_quant_paramsInput quantization parameters
[in]output_quant_paramsOutput quantization parameters
[in]input_dimsInput tensor dimensions
[in]input_dataPointer to input tensor
[in]state_dimsState tensor dimensions
[in]state_dataPointer to state tensor
[in]weights_feature_dimsWeights (feature) tensor dimensions
[in]weights_feature_dataPointer to the weights (feature) tensor
[in]weights_time_dimsWeights (time) tensor dimensions
[in]weights_time_dataPointer to the weights (time) tensor
[in]bias_dimsBias tensor dimensions
[in]bias_dataPointer to bias tensor
[in]output_dimsOutput tensor dimensions
[out]output_dataPointer to the output tensor
Returns
The function returns ARM_CMSIS_NN_SUCCESS
  1. Supported framework: TensorFlow Lite micro
  2. q7 is used as data type eventhough it is s8 data. It is done so to be consistent with existing APIs.

References ARM_CMSIS_NN_ARG_ERROR, ARM_CMSIS_NN_SUCCESS, arm_nn_requantize(), arm_nn_vec_mat_mult_t_s8(), cmsis_nn_context::buf, CLAMP, cmsis_nn_dims::h, cmsis_nn_svdf_params::input_activation, cmsis_nn_svdf_params::input_offset, cmsis_nn_activation::max, cmsis_nn_activation::min, cmsis_nn_per_tensor_quant_params::multiplier, cmsis_nn_dims::n, cmsis_nn_svdf_params::output_activation, cmsis_nn_svdf_params::output_offset, cmsis_nn_svdf_params::rank, and cmsis_nn_per_tensor_quant_params::shift.

arm_cmsis_nn_status arm_svdf_state_s16_s8 ( const cmsis_nn_context input_ctx,
const cmsis_nn_context output_ctx,
const cmsis_nn_svdf_params svdf_params,
const cmsis_nn_per_tensor_quant_params input_quant_params,
const cmsis_nn_per_tensor_quant_params output_quant_params,
const cmsis_nn_dims input_dims,
const q7_t input_data,
const cmsis_nn_dims state_dims,
q15_t state_data,
const cmsis_nn_dims weights_feature_dims,
const q7_t weights_feature_data,
const cmsis_nn_dims weights_time_dims,
const q15_t weights_time_data,
const cmsis_nn_dims bias_dims,
const q31_t bias_data,
const cmsis_nn_dims output_dims,
q7_t output_data 
)
Parameters
[in]input_ctxTemporary scratch buffer The caller is expected to clear the buffer ,if applicable, for security reasons.
[in]output_ctxTemporary output scratch buffer The caller is expected to clear the buffer ,if applicable, for security reasons.
[in]svdf_paramsSVDF Parameters Range of svdf_params->input_offset : [-128, 127] Range of svdf_params->output_offset : [-128, 127]
[in]input_quant_paramsInput quantization parameters
[in]output_quant_paramsOutput quantization parameters
[in]input_dimsInput tensor dimensions
[in]input_dataPointer to input tensor
[in]state_dimsState tensor dimensions
[in]state_dataPointer to state tensor
[in]weights_feature_dimsWeights (feature) tensor dimensions
[in]weights_feature_dataPointer to the weights (feature) tensor
[in]weights_time_dimsWeights (time) tensor dimensions
[in]weights_time_dataPointer to the weights (time) tensor
[in]bias_dimsBias tensor dimensions
[in]bias_dataPointer to bias tensor
[in]output_dimsOutput tensor dimensions
[out]output_dataPointer to the output tensor
Returns
The function returns ARM_CMSIS_NN_SUCCESS
  1. Supported framework: TensorFlow Lite micro
  2. q7 is used as data type eventhough it is s8 data. It is done so to be consistent with existing APIs.

References ARM_CMSIS_NN_ARG_ERROR, ARM_CMSIS_NN_SUCCESS, arm_nn_read_q15x2_ia(), arm_nn_requantize(), arm_nn_vec_mat_mult_t_svdf_s8(), cmsis_nn_context::buf, CLAMP, cmsis_nn_dims::h, cmsis_nn_svdf_params::input_activation, cmsis_nn_svdf_params::input_offset, cmsis_nn_activation::max, cmsis_nn_activation::min, cmsis_nn_per_tensor_quant_params::multiplier, cmsis_nn_dims::n, cmsis_nn_svdf_params::output_activation, cmsis_nn_svdf_params::output_offset, cmsis_nn_svdf_params::rank, and cmsis_nn_per_tensor_quant_params::shift.