Commit f91c1f3c authored by Christophe Favergeon's avatar Christophe Favergeon
Browse files

Better test automation with cmsis build tools

Added a python script for automation of tests with cmsis build tools.
Correction to some tests
Float promotion issues in some f16 code.
parent 43aa2a9e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -56,7 +56,12 @@
 @remark
                   Refer to \ref arm_correlate_opt_q7() for a faster implementation of this function.
 */
#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE)

#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H)
#pragma GCC warning "Scalar version of arm_correlate_q7 built. Helium version has build issues with gcc."
#endif 

#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) &&  !defined(__CMSIS_GCC_H)
#include "arm_helium_utils.h"

#include "arm_vec_filtering.h"
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
  @return        none
 */


#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE)

#include <stdint.h>
+6 −1
Original line number Diff line number Diff line
@@ -46,7 +46,12 @@
  @return        none
 */

#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE)
#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H)
#pragma GCC warning "Scalar version of arm_absmax_q7 built. Helium version has build issues with gcc."
#endif 


#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) &&  !defined(__CMSIS_GCC_H)

#include <stdint.h>
#include "arm_helium_utils.h"
+2 −2
Original line number Diff line number Diff line
@@ -124,8 +124,8 @@ void arm_f16_to_q15(
         * convert from float to Q31 and then store the results in the destination buffer
         */
        in = *pIn++;
        in = (in * 32768.0);
        in += in > 0.0 ? 0.5 : -0.5;
        in = ((_Float16)in * (_Float16)32768.0f16);
        in += (_Float16)in > 0.0f16 ? 0.5f16 : -0.5f16;
        *pDst++ = clip_q31_to_q15((q31_t) (in));

#else
+3 −3
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ a double precision computation.
#define REL_ERROR_ACCUMULATE (7.0e-3)

#define REL_KULLBACK_ERROR (5.0e-3)
#define ABS_KULLBACK_ERROR (5.0e-3)
#define ABS_KULLBACK_ERROR (1.0e-2)

    void StatsTestsF16::test_max_f16()
    {
@@ -820,7 +820,7 @@ a double precision computation.

            case StatsTestsF16::TEST_MAX_NO_IDX_F16_27:
            {
               inputA.reload(StatsTestsF16::INPUT1_F16_ID,mgr,8);
               inputA.reload(StatsTestsF16::INPUT1_F16_ID,mgr,16);
              
               ref.reload(StatsTestsF16::MAXVALS_F16_ID,mgr);
               
@@ -832,7 +832,7 @@ a double precision computation.

            case StatsTestsF16::TEST_MAX_NO_IDX_F16_28:
            {
               inputA.reload(StatsTestsF16::INPUT1_F16_ID,mgr,11);
               inputA.reload(StatsTestsF16::INPUT1_F16_ID,mgr,23);
              
               ref.reload(StatsTestsF16::MAXVALS_F16_ID,mgr);
               
Loading