diff options
author | ramelg01 <ramy.elgammal@arm.com> | 2022-04-08 03:52:28 +0100 |
---|---|---|
committer | Ramy Elgammal <ramy.elgammal@arm.com> | 2022-04-25 15:35:59 +0000 |
commit | c827e99fc46521f43719b0c2d1b6f05d66abf68c (patch) | |
tree | 31df1002673b2a4c4aae66608ad85b1ad6517050 /src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp | |
parent | 0a3948394e7e77344201b8732e9c20fcb5fa9a38 (diff) | |
download | ComputeLibrary-c827e99fc46521f43719b0c2d1b6f05d66abf68c.tar.gz |
Update Neon™ pooling kernel
- Reduce duplication and simplify overall structure.
- Improve multi-threaded performance by sharing more data
in lower-level caches.
Partially Resolves: COMPMID-5054
Signed-off-by: Ramy Elgammal<ramy.elgammal@arm.com>
Change-Id: I5f4dc50913401d5c1cbfc10b866fae9490cbc4d7
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7404
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Andrew Mundy
Reviewed-by: Sheri Zhang <sheri.zhang@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp')
-rw-r--r-- | src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp b/src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp index 6dffdcf01c..225f1e42c9 100644 --- a/src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp +++ b/src/core/NEON/kernels/arm_conv/pooling/kernels/cpp_nhwc_1x1_stride_any_depthfirst.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. + * Copyright (c) 2020-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -33,18 +33,11 @@ template <typename T> void cpp_nhwc_1x1_stride_any_depthfirst_impl(const uint64_t, const uint64_t, uint64_t n_channels, const T *const *const inptrs, T *outptr); template <typename T> -struct cpp_nhwc_1x1_stride_any_depthfirst +struct cpp_nhwc_1x1_stride_any_depthfirst : IGenericDepthfirstStrategy<T, T, Nothing> { - typedef T operand_type; - typedef T return_type; - - typedef void (*kern_type)(const uint64_t, const uint64_t, uint64_t n_channels, const operand_type *const *const inptrs, return_type *outptr); - - constexpr static PoolingType pooling_type(void) { return PoolingType::MAX; } - - kern_type kernel = cpp_nhwc_1x1_stride_any_depthfirst_impl; - + using Parent = IGenericDepthfirstStrategy<T, T, Nothing>; cpp_nhwc_1x1_stride_any_depthfirst(const CPUInfo *) {} + typename Parent::KernelType get_kernel(void) const override { return cpp_nhwc_1x1_stride_any_depthfirst_impl<T>; } }; } // namespace pooling |