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 --- .../NEON/functions/NEDequantizationLayer.cpp | 36 +++++++--------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'src/runtime/NEON/functions/NEDequantizationLayer.cpp') diff --git a/src/runtime/NEON/functions/NEDequantizationLayer.cpp b/src/runtime/NEON/functions/NEDequantizationLayer.cpp index 0627977686..e92b4bfdc4 100644 --- a/src/runtime/NEON/functions/NEDequantizationLayer.cpp +++ b/src/runtime/NEON/functions/NEDequantizationLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -24,34 +24,20 @@ #include "arm_compute/runtime/NEON/functions/NEDequantizationLayer.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/core/Validate.h" -#include "arm_compute/runtime/NEON/NEScheduler.h" +#include "arm_compute/core/NEON/kernels/NEDequantizationLayerKernel.h" +#include "support/ToolchainSupport.h" -using namespace arm_compute; - -NEDequantizationLayer::NEDequantizationLayer() - : _dequantize_kernel() +namespace arm_compute { -} - -Status NEDequantizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *min_max) +void NEDequantizationLayer::configure(const ITensor *input, ITensor *output) { - ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output, min_max); - ARM_COMPUTE_RETURN_ON_ERROR(NEDequantizationLayerKernel::validate(input, output, min_max)); - - return Status{}; + auto k = arm_compute::support::cpp14::make_unique(); + k->configure(input, output); + _kernel = std::move(k); } -void NEDequantizationLayer::configure(const ITensor *input, ITensor *output, const ITensor *min_max) +Status NEDequantizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output) { - ARM_COMPUTE_ERROR_ON_NULLPTR(input, output, min_max); - - // Configure kernel - _dequantize_kernel.configure(input, output, min_max); + return NEDequantizationLayerKernel::validate(input, output); } - -void NEDequantizationLayer::run() -{ - NEScheduler::get().schedule(&_dequantize_kernel, Window::DimY); -} \ No newline at end of file +} // namespace arm_compute \ No newline at end of file -- cgit v1.2.1