NMSIS-NN  Version 1.3.1
NMSIS NN Software Library
SVDF Functions

Modules

 GetBufferSizeSVDF
 

Functions

riscv_nmsis_nn_status riscv_svdf_s8 (const nmsis_nn_context *ctx, const nmsis_nn_context *input_ctx, const nmsis_nn_context *output_ctx, const nmsis_nn_svdf_params *svdf_params, const nmsis_nn_per_tensor_quant_params *input_quant_params, const nmsis_nn_per_tensor_quant_params *output_quant_params, const nmsis_nn_dims *input_dims, const int8_t *input_data, const nmsis_nn_dims *state_dims, int8_t *state_data, const nmsis_nn_dims *weights_feature_dims, const int8_t *weights_feature_data, const nmsis_nn_dims *weights_time_dims, const int8_t *weights_time_data, const nmsis_nn_dims *bias_dims, const int32_t *bias_data, const nmsis_nn_dims *output_dims, int8_t *output_data)
 s8 SVDF function with 8 bit state tensor and 8 bit time weights More...
 
riscv_nmsis_nn_status riscv_svdf_state_s16_s8 (const nmsis_nn_context *input_ctx, const nmsis_nn_context *output_ctx, const nmsis_nn_svdf_params *svdf_params, const nmsis_nn_per_tensor_quant_params *input_quant_params, const nmsis_nn_per_tensor_quant_params *output_quant_params, const nmsis_nn_dims *input_dims, const int8_t *input_data, const nmsis_nn_dims *state_dims, int16_t *state_data, const nmsis_nn_dims *weights_feature_dims, const int8_t *weights_feature_data, const nmsis_nn_dims *weights_time_dims, const int16_t *weights_time_data, const nmsis_nn_dims *bias_dims, const int32_t *bias_data, const nmsis_nn_dims *output_dims, int8_t *output_data)
 s8 SVDF function with 16 bit state tensor and 16 bit time weights More...
 

Detailed Description

Function Documentation

◆ riscv_svdf_s8()

riscv_nmsis_nn_status riscv_svdf_s8 ( const nmsis_nn_context ctx,
const nmsis_nn_context input_ctx,
const nmsis_nn_context output_ctx,
const nmsis_nn_svdf_params svdf_params,
const nmsis_nn_per_tensor_quant_params input_quant_params,
const nmsis_nn_per_tensor_quant_params output_quant_params,
const nmsis_nn_dims input_dims,
const int8_t *  input_data,
const nmsis_nn_dims state_dims,
int8_t *  state_data,
const nmsis_nn_dims weights_feature_dims,
const int8_t *  weights_feature_data,
const nmsis_nn_dims weights_time_dims,
const int8_t *  weights_time_data,
const nmsis_nn_dims bias_dims,
const int32_t *  bias_data,
const nmsis_nn_dims output_dims,
int8_t *  output_data 
)

s8 SVDF function with 8 bit state tensor and 8 bit time weights

Parameters
[in,out]ctxFunction context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function riscv_fully_connected_s8_get_buffer_size() provides the buffer size if an additional buffer is required. The caller is expected to clear the buffer, if applicable, for security reasons.
[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 either RISCV_NMSIS_NN_ARG_ERROR if argument constraints fail. or, RISCV_NMSIS_NN_SUCCESS on successful completion.
  1. Supported framework: TensorFlow Lite micro

◆ riscv_svdf_state_s16_s8()

riscv_nmsis_nn_status riscv_svdf_state_s16_s8 ( const nmsis_nn_context input_ctx,
const nmsis_nn_context output_ctx,
const nmsis_nn_svdf_params svdf_params,
const nmsis_nn_per_tensor_quant_params input_quant_params,
const nmsis_nn_per_tensor_quant_params output_quant_params,
const nmsis_nn_dims input_dims,
const int8_t *  input_data,
const nmsis_nn_dims state_dims,
int16_t *  state_data,
const nmsis_nn_dims weights_feature_dims,
const int8_t *  weights_feature_data,
const nmsis_nn_dims weights_time_dims,
const int16_t *  weights_time_data,
const nmsis_nn_dims bias_dims,
const int32_t *  bias_data,
const nmsis_nn_dims output_dims,
int8_t *  output_data 
)

s8 SVDF function with 16 bit state tensor and 16 bit time weights

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 RISCV_NMSIS_NN_SUCCESS
  1. Supported framework: TensorFlow Lite micro