diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-04-29 11:44:10 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-05-13 09:33:35 +0000 |
commit | 5ce897f80a1a6ade8a07d61c7aaaf70d2aa5ee02 (patch) | |
tree | dd87feb17198db35a5a838b6f9c14825ce25d02f /arm_compute/core/NEON/kernels/convolution | |
parent | a1b8babbb492fa4cd3b392f6376a2dfa85fc854d (diff) | |
download | ComputeLibrary-5ce897f80a1a6ade8a07d61c7aaaf70d2aa5ee02.tar.gz |
COMPMID-3108: Add Winograd 3x3,4x4 FP16 support for NEON
Change-Id: I20680dc74a3d709297539e2132417308a7aecc9d
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3159
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels/convolution')
-rw-r--r-- | arm_compute/core/NEON/kernels/convolution/common/utils.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arm_compute/core/NEON/kernels/convolution/common/utils.hpp b/arm_compute/core/NEON/kernels/convolution/common/utils.hpp index 25bfa332fb..99b2282f7e 100644 --- a/arm_compute/core/NEON/kernels/convolution/common/utils.hpp +++ b/arm_compute/core/NEON/kernels/convolution/common/utils.hpp @@ -24,6 +24,8 @@ #pragma once +#include <limits> + void PrintMatrix(const float *const m, const int M, const int N, const int row_stride); constexpr inline int iceildiv(const int a, const int b) @@ -36,3 +38,23 @@ inline T roundup(const T a, const T b) { return b * iceildiv(a, b); } + +template<typename T> +struct TypeBounds +{ + static constexpr T lower() noexcept { return std::numeric_limits<T>::has_infinity + ? -std::numeric_limits<T>::infinity() + : std::numeric_limits<T>::lowest(); }; + static constexpr T upper() noexcept { return std::numeric_limits<T>::has_infinity + ? std::numeric_limits<T>::infinity() + : std::numeric_limits<T>::max(); }; +}; + +#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC +template<> +struct TypeBounds<__fp16> +{ + static constexpr __fp16 lower() noexcept { return -std::numeric_limits<float>::infinity(); }; + static constexpr __fp16 upper() noexcept { return std::numeric_limits<float>::infinity(); } +}; +#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ |