diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2019-10-15 11:09:33 +0100 |
---|---|---|
committer | Giorgio Arena <giorgio.arena@arm.com> | 2019-10-21 10:14:20 +0000 |
commit | d93e263e70e3101422402c95946e520fef34c4c7 (patch) | |
tree | f79d3b325ed6881fb9252cb7ee0b7573739e00be /support | |
parent | ab5b1a279284bed350d3bb75f3d9d3aec6edca0e (diff) | |
download | ComputeLibrary-d93e263e70e3101422402c95946e520fef34c4c7.tar.gz |
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>
Diffstat (limited to 'support')
-rw-r--r-- | support/ToolchainSupport.h | 18 |
1 files changed, 15 insertions, 3 deletions
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 <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 @@ inline T copysign(T x, T y) * * @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 @@ inline int snprintf(char *s, size_t n, const char *fmt, Ts &&... args) { 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 @@ inline T copysign(T x, T y) * * @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); |