SVDF 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)
-
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)
- group SVDF
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
Supported framework: TensorFlow Lite micro
- Parameters
ctx – [inout] Function 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.
input_ctx – [in] Temporary scratch buffer The caller is expected to clear the buffer, if applicable, for security reasons.
output_ctx – [in] Temporary output scratch buffer The caller is expected to clear the buffer, if applicable, for security reasons.
svdf_params – [in] SVDF Parameters Range of svdf_params->input_offset : [-128, 127] Range of svdf_params->output_offset : [-128, 127]
input_quant_params – [in] Input quantization parameters
output_quant_params – [in] Output quantization parameters
input_dims – [in] Input tensor dimensions
input_data – [in] Pointer to input tensor
state_dims – [in] State tensor dimensions
state_data – [in] Pointer to state tensor
weights_feature_dims – [in] Weights (feature) tensor dimensions
weights_feature_data – [in] Pointer to the weights (feature) tensor
weights_time_dims – [in] Weights (time) tensor dimensions
weights_time_data – [in] Pointer to the weights (time) tensor
bias_dims – [in] Bias tensor dimensions
bias_data – [in] Pointer to bias tensor
output_dims – [in] Output tensor dimensions
output_data – [out] Pointer 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.
-
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
Supported framework: TensorFlow Lite micro
- Parameters
input_ctx – [in] Temporary scratch buffer The caller is expected to clear the buffer, if applicable, for security reasons.
output_ctx – [in] Temporary output scratch buffer The caller is expected to clear the buffer, if applicable, for security reasons.
svdf_params – [in] SVDF Parameters Range of svdf_params->input_offset : [-128, 127] Range of svdf_params->output_offset : [-128, 127]
input_quant_params – [in] Input quantization parameters
output_quant_params – [in] Output quantization parameters
input_dims – [in] Input tensor dimensions
input_data – [in] Pointer to input tensor
state_dims – [in] State tensor dimensions
state_data – [in] Pointer to state tensor
weights_feature_dims – [in] Weights (feature) tensor dimensions
weights_feature_data – [in] Pointer to the weights (feature) tensor
weights_time_dims – [in] Weights (time) tensor dimensions
weights_time_data – [in] Pointer to the weights (time) tensor
bias_dims – [in] Bias tensor dimensions
bias_data – [in] Pointer to bias tensor
output_dims – [in] Output tensor dimensions
output_data – [out] Pointer to the output tensor
- Returns
The function returns
RISCV_NMSIS_NN_SUCCESS
-
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)