aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/assembly/pool_common.hpp
diff options
context:
space:
mode:
authorramelg01 <ramy.elgammal@arm.com>2022-04-08 03:52:28 +0100
committerRamy Elgammal <ramy.elgammal@arm.com>2022-04-25 15:35:59 +0000
commitc827e99fc46521f43719b0c2d1b6f05d66abf68c (patch)
tree31df1002673b2a4c4aae66608ad85b1ad6517050 /src/core/NEON/kernels/assembly/pool_common.hpp
parent0a3948394e7e77344201b8732e9c20fcb5fa9a38 (diff)
downloadComputeLibrary-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/assembly/pool_common.hpp')
-rw-r--r--src/core/NEON/kernels/assembly/pool_common.hpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/core/NEON/kernels/assembly/pool_common.hpp b/src/core/NEON/kernels/assembly/pool_common.hpp
index b6a0a0abed..599e18ac59 100644
--- a/src/core/NEON/kernels/assembly/pool_common.hpp
+++ b/src/core/NEON/kernels/assembly/pool_common.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,8 +23,9 @@
*/
#pragma once
-
-#include "common.hpp"
+#ifdef CYCLE_PROFILING
+#include "profiler.hpp"
+#endif
namespace arm_conv
{
@@ -53,6 +54,11 @@ struct PoolingStride
unsigned int rows, cols;
};
+struct PaddingValues
+{
+ unsigned int left, top, right, bottom;
+};
+
class IPoolingCommon
{
public:
@@ -60,6 +66,7 @@ public:
// Determine the amount of working space required.
virtual size_t get_working_size(unsigned int num_threads) const = 0;
+ virtual size_t get_working_size(unsigned int num_threads, unsigned int n_channels) const = 0;
// Execute pooling over the specified area of memory.
virtual void execute(
@@ -103,14 +110,5 @@ public:
unsigned int num_threads) const = 0;
};
-struct Nothing
-{
-};
-
-template <typename TInput, typename TOutput, class OutputStage = Nothing>
-class PoolingCommon : public IPoolingCommon
-{
-};
-
} // namespace pooling
} // namespace arm_conv