From d93e263e70e3101422402c95946e520fef34c4c7 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Tue, 15 Oct 2019 11:09:33 +0100 Subject: 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 Reviewed-on: https://review.mlplatform.org/c/2094 Comments-Addressed: Arm Jenkins Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins --- support/ToolchainSupport.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'support') diff --git a/support/ToolchainSupport.h b/support/ToolchainSupport.h index b4ed2fa9a4..deaded34f3 100644 --- a/support/ToolchainSupport.h +++ b/support/ToolchainSupport.h @@ -35,6 +35,10 @@ #include #include +#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC +#include +#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC + #include "support/Half.h" namespace arm_compute @@ -228,7 +232,11 @@ inline T copysign(T x, T y) * * @return Result floating point value equal to (x*y) + z.c */ -template ::value>::type> +template < typename T, typename = typename std::enable_if < std::is_floating_point::value +#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC + || std::is_same::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 @@ inline int snprintf(char *s, size_t n, const char *fmt, Ts &&... args) { return ::snprintf(s, n, fmt, std::forward(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 @@ inline T copysign(T x, T y) * * @return Result floating point value equal to (x*y) + z. */ -template ::value>::type> +template < typename T, typename = typename std::enable_if < std::is_floating_point::value +#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC + || std::is_same::value +#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC + >::type > inline T fma(T x, T y, T z) { return std::fma(x, y, z); -- cgit v1.2.1