From 00f4dfce66c0e1cb820b443f111b7c01846d4d5b Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 10 Mar 2021 09:55:14 +0000 Subject: Port Arm(R) Neon(TM) Dequantization to new API Partially resolves: COMPMID-4193 Change-Id: Icf9afdd009f7fd03ccfff3da47ca8f8cc87e2d3a Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5245 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Sang-Hoon Park --- .../runtime/NEON/functions/NEDequantizationLayer.h | 30 ++++++++++++++++++---- .../NEON/functions/NEGenerateProposalsLayer.h | 2 +- 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'arm_compute/runtime/NEON') diff --git a/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h b/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h index f52d709c74..a18566e6ca 100644 --- a/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h +++ b/arm_compute/runtime/NEON/functions/NEDequantizationLayer.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_NEDEQUANTIZATIONLAYER_H #define ARM_COMPUTE_NEDEQUANTIZATIONLAYER_H -#include "arm_compute/runtime/NEON/INESimpleFunctionNoBorder.h" - #include "arm_compute/core/Types.h" +#include "arm_compute/runtime/IFunction.h" + +#include namespace arm_compute { @@ -34,10 +35,22 @@ namespace arm_compute class ITensor; class ITensorInfo; -/** Basic function to run @ref NEDequantizationLayerKernel that dequantizes an input tensor */ -class NEDequantizationLayer : public INESimpleFunctionNoBorder +/** Basic function to run @ref cpu::CpuDequantization that dequantizes an input tensor */ +class NEDequantizationLayer : public IFunction { public: + /** Default Constructor */ + NEDequantizationLayer(); + /** Default Destructor */ + ~NEDequantizationLayer(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEDequantizationLayer(const NEDequantizationLayer &) = delete; + /** Default move constructor */ + NEDequantizationLayer(NEDequantizationLayer &&) = default; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEDequantizationLayer &operator=(const NEDequantizationLayer &) = delete; + /** Default move assignment operator */ + NEDequantizationLayer &operator=(NEDequantizationLayer &&) = default; /** Configure the kernel. * * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/QSYMM8/QSYMM16. @@ -52,6 +65,13 @@ public: * @return a status */ static Status validate(const ITensorInfo *input, const ITensorInfo *output); + + // Inherited methods overridden: + void run() override; + +private: + struct Impl; + std::unique_ptr _impl; }; } // namespace arm_compute #endif /* ARM_COMPUTE_NEDEQUANTIZATIONLAYER_H */ diff --git a/arm_compute/runtime/NEON/functions/NEGenerateProposalsLayer.h b/arm_compute/runtime/NEON/functions/NEGenerateProposalsLayer.h index 979b3ba83e..22c6ba2ed6 100644 --- a/arm_compute/runtime/NEON/functions/NEGenerateProposalsLayer.h +++ b/arm_compute/runtime/NEON/functions/NEGenerateProposalsLayer.h @@ -50,7 +50,7 @@ class NEComputeAllAnchorsKernel; * -# @ref NEReshapeLayer x 2 * -# @ref NEBoundingBoxTransform * -# @ref NEPadLayerKernel - * -# @ref NEDequantizationLayerKernel x 2 + * -# @ref NEDequantizationLayer x 2 * -# @ref NEQuantizationLayer * And the following CPP kernels: * -# @ref CPPBoxWithNonMaximaSuppressionLimit -- cgit v1.2.1