From ebcebf1dee7f8314976b1e0cabd62b4cf893d765 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 21 Oct 2020 00:04:14 +0100 Subject: COMPMID-3638: Move NEON kernels Signed-off-by: Michalis Spyrou Change-Id: Ieed3e4bc8be7fef80c90c5094599b477a56fc473 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4285 Comments-Addressed: Arm Jenkins Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- .../NEON/functions/NELocallyConnectedLayer.h | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h') diff --git a/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h b/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h index dbcaa297ab..e9f3e93474 100644 --- a/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h +++ b/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h @@ -26,13 +26,11 @@ #include "arm_compute/runtime/IFunction.h" -#include "arm_compute/core/NEON/kernels/NECol2ImKernel.h" -#include "arm_compute/core/NEON/kernels/NEIm2ColKernel.h" -#include "arm_compute/core/NEON/kernels/NELocallyConnectedMatrixMultiplyKernel.h" -#include "arm_compute/core/NEON/kernels/NEWeightsReshapeKernel.h" #include "arm_compute/core/Types.h" #include "arm_compute/runtime/IMemoryManager.h" #include "arm_compute/runtime/MemoryGroup.h" +#include "arm_compute/runtime/NEON/functions/NECol2Im.h" +#include "arm_compute/runtime/NEON/functions/NEIm2Col.h" #include "arm_compute/runtime/Tensor.h" #include @@ -40,6 +38,8 @@ namespace arm_compute { class INETensor; +class NEWeightsReshapeKernel; +class NELocallyConnectedMatrixMultiplyKernel; /** Basic function to compute the locally connected layer. This function calls the following NEON kernels: * @@ -61,6 +61,8 @@ public: NELocallyConnectedLayer &operator=(const NELocallyConnectedLayer &) = delete; /** Default move assignment operator */ NELocallyConnectedLayer &operator=(NELocallyConnectedLayer &&) = default; + /** Default destructor */ + ~NELocallyConnectedLayer(); /** Set the input and output tensors. * * @param[in] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM], @@ -94,16 +96,16 @@ public: void prepare() override; private: - MemoryGroup _memory_group; - NEIm2ColKernel _input_im2col_kernel; - NEWeightsReshapeKernel _weights_reshape_kernel; - NELocallyConnectedMatrixMultiplyKernel _mm_kernel; - NECol2ImKernel _output_col2im_kernel; - Tensor _input_im2col_reshaped; - Tensor _weights_reshaped; - Tensor _gemm_output; - bool _is_prepared; - const ITensor *_original_weights; + MemoryGroup _memory_group; + NEIm2Col _input_im2col; + std::unique_ptr _weights_reshape_kernel; + std::unique_ptr _mm_kernel; + NECol2Im _output_col2im; + Tensor _input_im2col_reshaped; + Tensor _weights_reshaped; + Tensor _gemm_output; + bool _is_prepared; + const ITensor *_original_weights; }; } #endif /* ARM_COMPUTE_NELOCALLYCONNECTEDLAYER_H */ -- cgit v1.2.1