aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/operators/CpuFlatten.h
diff options
context:
space:
mode:
authorAnitha Raj <anitha.raj@arm.com>2023-08-22 15:46:27 +0100
committerAnitha Raj <Anitha.Raj@arm.com>2023-08-23 08:44:11 +0000
commit082630ba4e2de697b6d372dd35ffc1be6a42c346 (patch)
tree8d08824bf8d30d8bc3ade4493ed43bfbcae97bae /src/cpu/operators/CpuFlatten.h
parent1b2ee3eb6991efcbd09cde84ab0c383f15648738 (diff)
downloadComputeLibrary-082630ba4e2de697b6d372dd35ffc1be6a42c346.tar.gz
Update CpuGemmConv2d and CpuFlatten to use CpuReshape operator
- Following CpuReshapeKernel Optimizations, update the CpuGemmConv2D and CpuFlatten to use CpuReshape operator instead of CpuReshapeKernel - Minor changes to comment in NEReorgLayerKernel.h Resolves COMPMID-6504 Signed-off-by: Anitha Raj <anitha.raj@arm.com> Change-Id: Ib6ee1fdc313d91249f9fe41c81e73324031c1ff4 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10186 Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/operators/CpuFlatten.h')
-rw-r--r--src/cpu/operators/CpuFlatten.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cpu/operators/CpuFlatten.h b/src/cpu/operators/CpuFlatten.h
index 0e9fcbdc35..911760dd95 100644
--- a/src/cpu/operators/CpuFlatten.h
+++ b/src/cpu/operators/CpuFlatten.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef ARM_COMPUTE_CPU_FLATTEN_H
-#define ARM_COMPUTE_CPU_FLATTEN_H
+#ifndef ACL_SRC_CPU_OPERATORS_CPUFLATTEN_H
+#define ACL_SRC_CPU_OPERATORS_CPUFLATTEN_H
#include "src/cpu/ICpuOperator.h"
@@ -30,10 +30,15 @@ namespace arm_compute
{
namespace cpu
{
+class CpuReshape;
/** Basic function to flatten a given input */
class CpuFlatten : public ICpuOperator
{
public:
+ /** Constructor */
+ CpuFlatten();
+ /** Destructor */
+ ~CpuFlatten();
/** Configure operator for a given list of arguments
*
* Valid data layouts:
@@ -58,7 +63,13 @@ public:
* @return a status
*/
static Status validate(const ITensorInfo *src, const ITensorInfo *dst);
+
+ // Inherited methods overridden:
+ void run(ITensorPack &tensors) override;
+
+private:
+ std::unique_ptr<CpuReshape> _reshape;
};
} // namespace cpu
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CPU_FLATTEN_H */
+#endif // ACL_SRC_CPU_OPERATORS_CPUFLATTEN_H