Update according to review comments.
Change-Id: I401fd2ba83ebf31ca20d199a47e952f036c4bbf4
diff --git a/CMSIS/NN/Include/arm_nnfunctions.h b/CMSIS/NN/Include/arm_nnfunctions.h
index 921e9e5..d9b62e1 100644
--- a/CMSIS/NN/Include/arm_nnfunctions.h
+++ b/CMSIS/NN/Include/arm_nnfunctions.h
@@ -2073,8 +2073,8 @@
* @param[in] input_ctx Temporary scratch buffer
* @param[in] output_ctx Temporary output scratch buffer
* @param[in] svdf_params SVDF Parameters
- * Range of svdf_params->input_offset : [-127, 128]
- * Range of svdf_params->output_offset : [-127, 128]
+ Range of svdf_params->input_offset : [-128, 127]
+ Range of svdf_params->output_offset : [-128, 127]
* @param[in] input_quant_params Input quantization parameters
* @param[in] output_quant_params Output quantization parameters
* @param[in] input_dims Input tensor dimensions
diff --git a/CMSIS/NN/Source/SVDFunctions/arm_svdf_s8.c b/CMSIS/NN/Source/SVDFunctions/arm_svdf_s8.c
index 11ea7fb..a03ed9b 100644
--- a/CMSIS/NN/Source/SVDFunctions/arm_svdf_s8.c
+++ b/CMSIS/NN/Source/SVDFunctions/arm_svdf_s8.c
@@ -90,7 +90,7 @@
const int32_t input_height = input_dims->h;
const int32_t feature_batches = weights_feature_dims->n;
const int32_t time_batches = weights_time_dims->h;
- const int32_t unit_cnt = feature_batches / rank;
+ const int32_t unit_count = feature_batches / rank;
q31_t *buffer_a = (q31_t *)input_ctx->buf;
q31_t *buffer_b = (q31_t *)output_ctx->buf;
@@ -182,7 +182,6 @@
v2++;
}
#else
- int32_t sum = 0;
for (int j = 0; j < time_batches; j++)
{
sum += *v1 * *v2;
@@ -198,10 +197,10 @@
for (int i_batch = 0; i_batch < input_batches; i_batch++)
{
- q31_t *output_data_temp = buffer_b + i_batch * unit_cnt;
+ q31_t *output_data_temp = buffer_b + i_batch * unit_count;
q31_t *ptr_a = buffer_a + i_batch * feature_batches;
- for (int i = 0; i < unit_cnt; i++)
+ for (int i = 0; i < unit_count; i++)
{
output_data_temp[i] = bias_data[i];
for (int j = 0; j < rank; j++)
@@ -212,7 +211,7 @@
}
}
- for (int i = 0; i < input_batches * unit_cnt; i++)
+ for (int i = 0; i < input_batches * unit_count; i++)
{
output_data[i] = (q7_t)CLAMP(arm_nn_requantize(buffer_b[i], multiplier_out, shift_2) + zp_out,
out_activation_max, out_activation_min);