From 574775c7fa78a094bbeb7f9f87aca832936884e2 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 18 Feb 2019 20:08:02 +0000 Subject: COMPMID-1937: Adds support for DequantizationLayer for NEON/CL. Change-Id: I4b73edd176a277294e0e42e642460bc61210778a Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/744 Tested-by: Arm Jenkins Reviewed-by: Giuseppe Rossini --- src/runtime/CL/functions/CLDequantizationLayer.cpp | 36 +++++++--------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'src/runtime/CL') diff --git a/src/runtime/CL/functions/CLDequantizationLayer.cpp b/src/runtime/CL/functions/CLDequantizationLayer.cpp index 6f33b2efa9..cdfdfc77ee 100644 --- a/src/runtime/CL/functions/CLDequantizationLayer.cpp +++ b/src/runtime/CL/functions/CLDequantizationLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -21,36 +21,22 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "arm_compute/runtime/CL/functions/CLDequantizationLayer.h" -#include "arm_compute/core/CL/ICLTensor.h" -#include "arm_compute/runtime/CL/CLScheduler.h" - -using namespace arm_compute; +#include "arm_compute/core/CL/kernels/CLDequantizationLayerKernel.h" +#include "support/ToolchainSupport.h" -CLDequantizationLayer::CLDequantizationLayer() - : _dequantize_kernel() +namespace arm_compute { -} - -Status CLDequantizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *min_max) +void CLDequantizationLayer::configure(const ICLTensor *input, ICLTensor *output) { - ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output, min_max); - ARM_COMPUTE_RETURN_ON_ERROR(CLDequantizationLayerKernel::validate(input, output, min_max)); - - return Status{}; -} - -void CLDequantizationLayer::configure(const ICLTensor *input, ICLTensor *output, const ICLTensor *min_max) -{ - ARM_COMPUTE_ERROR_ON_NULLPTR(input, output, min_max); - - _dequantize_kernel.configure(input, output, min_max); + auto k = arm_compute::support::cpp14::make_unique(); + k->configure(input, output); + _kernel = std::move(k); } -void CLDequantizationLayer::run() +Status CLDequantizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output) { - // Run dequantization kernel - CLScheduler::get().enqueue(_dequantize_kernel, false); + return CLDequantizationLayerKernel::validate(input, output); } +} // namespace arm_compute -- cgit v1.2.1