tests: lib: cmsis_dsp: filtering: Test partial convolution optionally

This commit makes the tests for the partial convolution functions
(`arm_conv_partial*`) optional because these functions have computation
precision-related issues (tested with CMSIS-DSP 1.9.0, which is part of
the CMSIS 5.8.0 release).

The partial convolution functions (especially the fast variants) can
return very low-precision results (as low as 14dB SNR) under certain
configurations.

This issue will be further investigated and reported to the upstream
CMSIS developers.

Once this issue is fixed upstream, revert this commit in order to make
the partial convolution tests run all the time.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2021-08-20 18:19:07 +09:00 committed by Carles Cufí
commit 8084684537
5 changed files with 74 additions and 0 deletions

View file

@ -10,4 +10,7 @@ config CMSIS_DSP_TEST_FILTERING_FIR
config CMSIS_DSP_TEST_FILTERING_MISC
bool "Test: Filtering MISC"
config CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL
bool "Test: Filtering MISC - Partial Convolution"
source "Kconfig"

View file

@ -169,6 +169,7 @@ DEFINE_CONV_TEST(13, 3);
DEFINE_CONV_TEST(13, 8);
DEFINE_CONV_TEST(13, 11);
#ifdef CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL
static void test_arm_conv_partial_f32(
size_t first, size_t in1_length, size_t in2_length,
const uint32_t *ref, size_t ref_length)
@ -207,6 +208,14 @@ static void test_arm_conv_partial_f32(
free(output);
free(temp);
}
#else
static void test_arm_conv_partial_f32(
size_t first, size_t in1_length, size_t in2_length,
const uint32_t *ref, size_t ref_length)
{
ztest_test_skip();
}
#endif /* CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL */
#define DEFINE_CONV_PARTIAL_TEST(a, b, c) \
DEFINE_TEST_VARIANT5( \

View file

@ -131,6 +131,7 @@ DEFINE_CONV_TEST(32, 17);
DEFINE_CONV_TEST(32, 18);
DEFINE_CONV_TEST(32, 33);
#ifdef CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL
static void test_arm_conv_partial_q15(
size_t first, size_t in1_length, size_t in2_length, const q15_t *ref,
size_t ref_length)
@ -290,6 +291,35 @@ static void test_arm_conv_partial_fast_opt_q15(
free(scratch1);
free(scratch2);
}
#else
static void test_arm_conv_partial_q15(
size_t first, size_t in1_length, size_t in2_length, const q15_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
static void test_arm_conv_partial_fast_q15(
size_t first, size_t in1_length, size_t in2_length, const q15_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
static void test_arm_conv_partial_opt_q15(
size_t first, size_t in1_length, size_t in2_length, const q15_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
static void test_arm_conv_partial_fast_opt_q15(
size_t first, size_t in1_length, size_t in2_length, const q15_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
#endif /* CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL */
#define DEFINE_CONV_PARTIAL_TEST(a, b, c) \
DEFINE_TEST_VARIANT5( \

View file

@ -162,6 +162,7 @@ DEFINE_CONV_TEST(13, 3);
DEFINE_CONV_TEST(13, 8);
DEFINE_CONV_TEST(13, 11);
#ifdef CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL
static void test_arm_conv_partial_q31(
size_t first, size_t in1_length, size_t in2_length, const q31_t *ref,
size_t ref_length)
@ -235,6 +236,21 @@ static void test_arm_conv_partial_fast_q31(
free(output);
free(temp);
}
#else
static void test_arm_conv_partial_q31(
size_t first, size_t in1_length, size_t in2_length, const q31_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
static void test_arm_conv_partial_fast_q31(
size_t first, size_t in1_length, size_t in2_length, const q31_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
#endif /* CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL */
#define DEFINE_CONV_PARTIAL_TEST(a, b, c) \
DEFINE_TEST_VARIANT5( \

View file

@ -130,6 +130,7 @@ DEFINE_CONV_TEST(48, 33);
DEFINE_CONV_TEST(48, 34);
DEFINE_CONV_TEST(48, 49);
#ifdef CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL
static void test_arm_conv_partial_q7(
size_t first, size_t in1_length, size_t in2_length, const q7_t *ref,
size_t ref_length)
@ -209,6 +210,21 @@ static void test_arm_conv_partial_opt_q7(
free(scratch1);
free(scratch2);
}
#else
static void test_arm_conv_partial_q7(
size_t first, size_t in1_length, size_t in2_length, const q7_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
static void test_arm_conv_partial_opt_q7(
size_t first, size_t in1_length, size_t in2_length, const q7_t *ref,
size_t ref_length)
{
ztest_test_skip();
}
#endif /* CONFIG_CMSIS_DSP_TEST_FILTERING_MISC_CONV_PARTIAL */
#define DEFINE_CONV_PARTIAL_TEST(a, b, c) \
DEFINE_TEST_VARIANT5( \