From 5c09ae8d3f82ddf8bf9438fc67e1991b62ae88e3 Mon Sep 17 00:00:00 2001 From: Luca Foschiani Date: Tue, 21 Jan 2020 16:24:16 +0000 Subject: COMPMID-2809 Added support for QASYMM8_SIGNED in NEUpsampleLayer Signed-off-by: Luca Foschiani Change-Id: I61638cb1e4f65130b150a456dc1cdb90099b0efa Reviewed-on: https://review.mlplatform.org/c/2615 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Tested-by: Arm Jenkins --- .../core/NEON/kernels/NEUpsampleLayerKernel.h | 37 +++++----------------- .../runtime/NEON/functions/NEUpsampleLayer.h | 6 ++-- 2 files changed, 11 insertions(+), 32 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/NEON/kernels/NEUpsampleLayerKernel.h b/arm_compute/core/NEON/kernels/NEUpsampleLayerKernel.h index 50c3e342e3..1ea3f974e7 100644 --- a/arm_compute/core/NEON/kernels/NEUpsampleLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEUpsampleLayerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -74,40 +74,19 @@ public: void run(const Window &window, const ThreadInfo &info) override; private: - /** Function to run upsample layer for FP32 (NCHW) + /** Function to run upsample layer (NCHW) * * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). */ - void upsample_f32_nchw(const Window &window); - /** Function to run upsample layer for FP32 (NHWC) + template + void upsample_nchw(const Window &window); + /** Function to run upsample layer (NHWC) * * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). */ - void upsample_f32_nhwc(const Window &window); - /** Function to run upsample layer for FP16 (NCHW) - * - * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). - */ - void upsample_f16_nchw(const Window &window); - /** Function to run upsample layer for FP16 (NHWC) - * - * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). - */ - void upsample_f16_nhwc(const Window &window); - /** Function to run upsample layer for QASYMM8 (NCHW) - * - * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). - */ - void upsample_qasymm8_nchw(const Window &window); - /** Function to run upsample layer for QASYMM8 (NHWC) - * - * @param[in] window Region on which to execute the kernel. (Must be a valid region of the window returned by window()). - */ - void upsample_qasymm8_nhwc(const Window &window); - /** Common signature for all the upsample layer functions - * - * @param[in] window Region on which to execute the kernel. - */ + template + void upsample_nhwc(const Window &window); + using UpsampleFunctionPtr = void (NEUpsampleLayerKernel::*)(const Window &window); private: diff --git a/arm_compute/runtime/NEON/functions/NEUpsampleLayer.h b/arm_compute/runtime/NEON/functions/NEUpsampleLayer.h index 6cd6ba3e9a..ff465e54a0 100644 --- a/arm_compute/runtime/NEON/functions/NEUpsampleLayer.h +++ b/arm_compute/runtime/NEON/functions/NEUpsampleLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -42,7 +42,7 @@ public: NEUpsampleLayer(); /** Set the input output tensors. * - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32. + * @param[in] input Source tensor. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. * @param[out] output Destination tensor. Data types supported: same as @p input. * @param[in] info Contains stride information described in @ref Size2D. * @param[in] policy Defines the policy to fill the intermediate pixels. @@ -52,7 +52,7 @@ public: const InterpolationPolicy &policy); /** Static function to check if given info will lead to a valid configuration of @ref NEUpsampleLayer * - * @param[in] input Source tensor info. Data types supported: QASYMM8/F16/F32. + * @param[in] input Source tensor info. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. * @param[out] output Destination tensor info. Data types supported: same as @p input. * @param[in] info Contains stride information described in @ref Size2D. * @param[in] policy Defines the policy to fill the intermediate pixels. -- cgit v1.2.1