From d556d7bafe6ad943f4aca0f5285ada7b8ce497f7 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 27 Oct 2020 10:56:31 +0000 Subject: Integrate improved pooling layer on NEON Resolves COMPMID-4035 Change-Id: I559f8c4208fba9193dfe5012f03ddaf26c746215 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4855 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- arm_compute/runtime/NEON/functions/NEPoolingLayer.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEPoolingLayer.h') diff --git a/arm_compute/runtime/NEON/functions/NEPoolingLayer.h b/arm_compute/runtime/NEON/functions/NEPoolingLayer.h index b45290fb46..d239138165 100644 --- a/arm_compute/runtime/NEON/functions/NEPoolingLayer.h +++ b/arm_compute/runtime/NEON/functions/NEPoolingLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,9 +24,10 @@ #ifndef ARM_COMPUTE_NEPOOLINGLAYER_H #define ARM_COMPUTE_NEPOOLINGLAYER_H +#include "arm_compute/core/Types.h" #include "arm_compute/runtime/IFunction.h" +#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/core/Types.h" #include namespace arm_compute @@ -35,17 +36,19 @@ class ITensor; class ITensorInfo; class NEPoolingLayerKernel; class NEFillBorderKernel; +class NEPoolingAssemblyDispatch; /** Basic function to simulate a pooling layer with the specified pooling operation. This function calls the following NEON kernels: * * -# @ref NEFillBorderKernel (executed if padding size is different from zero) * -# @ref NEPoolingLayerKernel + * -# @ref NEPoolingAssemblyDispatch */ class NEPoolingLayer : public IFunction { public: /** Constructor */ - NEPoolingLayer(); + NEPoolingLayer(std::shared_ptr memory_manager = nullptr); /** Prevent instances of this class from being copied (As this class contains pointers) */ NEPoolingLayer(const NEPoolingLayer &) = delete; /** Prevent instances of this class from being copied (As this class contains pointers) */ @@ -83,10 +86,14 @@ public: void run() override; private: - std::unique_ptr _pooling_layer_kernel; - std::unique_ptr _border_handler; - bool _is_global_pooling_layer; - DataLayout _data_layout; + std::shared_ptr _memory_manager; + + std::unique_ptr _pooling_layer_kernel; + std::unique_ptr _border_handler; + std::unique_ptr _asm_glue; + + bool _is_global_pooling_layer; + DataLayout _data_layout; }; } #endif /* ARM_COMPUTE_NEPOOLINGLAYER_H */ -- cgit v1.2.1