COMPMID-2708 NEDepthwiseConvolution Generic: support for QUANT8_PER_CHANNEL_SYMM
COMPMID-2470 Implement a new and generic depthwise convolution for NEON QASYMM8 NHWC
COMPMID-2477 Enable FP16 data type for the new generic convolution on NEON for NHWC
COMPMID-2625 Remove old implementation files for the generic NEDepthwiseConvolution
Change-Id: I8f6deda4fc69dd7e472fba3228b1ed5dad172f3e
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2094
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/support/ToolchainSupport.h b/support/ToolchainSupport.h
index b4ed2fa..deaded3 100644
--- a/support/ToolchainSupport.h
+++ b/support/ToolchainSupport.h
@@ -35,6 +35,10 @@
#include <string>
#include <type_traits>
+#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+#include <arm_neon.h>
+#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+
#include "support/Half.h"
namespace arm_compute
@@ -228,7 +232,11 @@
*
* @return Result floating point value equal to (x*y) + z.c
*/
-template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
+template < typename T, typename = typename std::enable_if < std::is_floating_point<T>::value
+#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+ || std::is_same<T, float16_t>::value
+#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+ >::type >
inline T fma(T x, T y, T z)
{
return ::fma(x, y, z);
@@ -250,7 +258,7 @@
{
return ::snprintf(s, n, fmt, std::forward<Ts>(args)...);
}
-#else /* (__ANDROID__ || BARE_METAL) */
+#else /* (__ANDROID__ || BARE_METAL) */
/** Convert integer and float values to string.
*
* @note This function acts as a convenience wrapper around std::to_string. The
@@ -354,7 +362,11 @@
*
* @return Result floating point value equal to (x*y) + z.
*/
-template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
+template < typename T, typename = typename std::enable_if < std::is_floating_point<T>::value
+#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+ || std::is_same<T, float16_t>::value
+#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+ >::type >
inline T fma(T x, T y, T z)
{
return std::fma(x, y, z);