Fix broken hifi3 NDSP lib patch file (#2457) Not clear if/how it worked before, because there were no updates to the library since the patch was created. BUG=322146544
diff --git a/tensorflow/lite/micro/tools/make/ext_libs/ndsplib-hifi3.patch b/tensorflow/lite/micro/tools/make/ext_libs/ndsplib-hifi3.patch index fe68668..f6c1421 100644 --- a/tensorflow/lite/micro/tools/make/ext_libs/ndsplib-hifi3.patch +++ b/tensorflow/lite/micro/tools/make/ext_libs/ndsplib-hifi3.patch
@@ -1,5 +1,5 @@ diff --git a/library/include/NatureDSP_Signal_math.h b/library/include/NatureDSP_Signal_math.h -index 2ffea63..55074ab 100644 +index 2ffea63..eff0e47 100644 --- a/library/include/NatureDSP_Signal_math.h +++ b/library/include/NatureDSP_Signal_math.h @@ -635,6 +635,7 @@ float32_t scl_atan2f (float32_t y, float32_t x); @@ -10,20 +10,20 @@ int32_t scl_tanh32x32(int32_t x); /*------------------------------------------------------------------------- -@@ -659,8 +660,12 @@ int32_t scl_tanh32x32(int32_t x); +@@ -659,7 +660,12 @@ int32_t scl_tanh32x32(int32_t x); return result, Q16.15 -------------------------------------------------------------------------*/ void vec_sigmoid32x32(int32_t * y, const int32_t * x, int N); +void vec_sigmoidf (float32_t * y, const float32_t * x, int N); int32_t scl_sigmoid32x32(int32_t x); +float32_t scl_sigmoidf(float32_t x); - ++ +void vec_relu32x32 (int32_t * y, const int32_t * x, int32_t K, int N); +void vec_reluf (float32_t * y, const float32_t * x, float32_t K, int N); + /*------------------------------------------------------------------------- Softmax - The function computes the softmax (normalized exponential function) of -@@ -685,6 +690,7 @@ int32_t scl_sigmoid32x32(int32_t x); +@@ -685,6 +691,7 @@ int32_t scl_sigmoid32x32(int32_t x); -------------------------------------------------------------------------*/ void vec_softmax32x32(int32_t * y, const int32_t * x, int N); @@ -32,7 +32,7 @@ /*------------------------------------------------------------------------- Integer to float conversion diff --git a/library/include/NatureDSP_types.h b/library/include/NatureDSP_types.h -index a38b334..bce8636 100644 +index a38b334..6322852 100644 --- a/library/include/NatureDSP_types.h +++ b/library/include/NatureDSP_types.h @@ -332,7 +332,9 @@ typedef struct tagComplex32_t @@ -41,7 +41,7 @@ #elif defined (COMPILER_XTENSA) +#if !defined restrict #define restrict __restrict -+#endif ++#endif #define onchip #define NASSERT(x) {(void)__builtin_expect((x)!=0,1);} #else