aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-02-18 20:08:02 +0000
committerGiuseppe Rossini <giuseppe.rossini@arm.com>2019-03-05 11:44:18 +0000
commit574775c7fa78a094bbeb7f9f87aca832936884e2 (patch)
treea405e7a265865acc1348860514de28de2835ce24 /src/runtime/CL
parent79fa9a22022824735986f74557bf38095eb2284d (diff)
downloadComputeLibrary-574775c7fa78a094bbeb7f9f87aca832936884e2.tar.gz
COMPMID-1937: Adds support for DequantizationLayer for NEON/CL.
Change-Id: I4b73edd176a277294e0e42e642460bc61210778a Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/744 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r--src/runtime/CL/functions/CLDequantizationLayer.cpp36
1 files changed, 11 insertions, 25 deletions
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<CLDequantizationLayerKernel>();
+ 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