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 --- src/runtime/NEON/functions/NEMaxUnpoolingLayer.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/runtime/NEON/functions/NEMaxUnpoolingLayer.cpp') diff --git a/src/runtime/NEON/functions/NEMaxUnpoolingLayer.cpp b/src/runtime/NEON/functions/NEMaxUnpoolingLayer.cpp index 9d3f34fba4..e8c9d09d95 100644 --- a/src/runtime/NEON/functions/NEMaxUnpoolingLayer.cpp +++ b/src/runtime/NEON/functions/NEMaxUnpoolingLayer.cpp @@ -25,9 +25,14 @@ #include "arm_compute/core/ITensor.h" #include "arm_compute/runtime/NEON/NEScheduler.h" +#include "src/core/NEON/kernels/NEMaxUnpoolingLayerKernel.h" +#include "src/core/NEON/kernels/NEMemsetKernel.h" +#include "support/MemorySupport.h" namespace arm_compute { +NEMaxUnpoolingLayer::~NEMaxUnpoolingLayer() = default; + NEMaxUnpoolingLayer::NEMaxUnpoolingLayer() : _memset_kernel(), _unpooling_layer_kernel() @@ -37,8 +42,10 @@ NEMaxUnpoolingLayer::NEMaxUnpoolingLayer() void NEMaxUnpoolingLayer::configure(ITensor *input, ITensor *indices, ITensor *output, const PoolingLayerInfo &pool_info) { const PixelValue zero_value(0.f); - _memset_kernel.configure(output, zero_value); - _unpooling_layer_kernel.configure(input, indices, output, pool_info); + _memset_kernel = arm_compute::support::cpp14::make_unique(); + _unpooling_layer_kernel = arm_compute::support::cpp14::make_unique(); + _memset_kernel->configure(output, zero_value); + _unpooling_layer_kernel->configure(input, indices, output, pool_info); } Status NEMaxUnpoolingLayer::validate(const ITensorInfo *input, const ITensorInfo *indices, const ITensorInfo *output, const PoolingLayerInfo &pool_info) @@ -48,7 +55,7 @@ Status NEMaxUnpoolingLayer::validate(const ITensorInfo *input, const ITensorInfo void NEMaxUnpoolingLayer::run() { - NEScheduler::get().schedule(&_memset_kernel, Window::DimY); - NEScheduler::get().schedule(&_unpooling_layer_kernel, Window::DimY); + NEScheduler::get().schedule(_memset_kernel.get(), Window::DimY); + NEScheduler::get().schedule(_unpooling_layer_kernel.get(), Window::DimY); } } /* namespace arm_compute */ -- cgit v1.2.1