diff options
author | Luca Foschiani <luca.foschiani@arm.com> | 2020-01-21 16:24:16 +0000 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-01-24 10:33:33 +0000 |
commit | 5c09ae8d3f82ddf8bf9438fc67e1991b62ae88e3 (patch) | |
tree | a28b63bd6a06858f25719e6f7c00ed05d55d60f8 /arm_compute | |
parent | d374ff2eb5d50785fb1d39d53b01109e452f4cfe (diff) | |
download | ComputeLibrary-5c09ae8d3f82ddf8bf9438fc67e1991b62ae88e3.tar.gz |
COMPMID-2809 Added support for QASYMM8_SIGNED in NEUpsampleLayer
Signed-off-by: Luca Foschiani <luca.foschiani@arm.com>
Change-Id: I61638cb1e4f65130b150a456dc1cdb90099b0efa
Reviewed-on: https://review.mlplatform.org/c/2615
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/NEON/kernels/NEUpsampleLayerKernel.h | 37 | ||||
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEUpsampleLayer.h | 6 |
2 files changed, 11 insertions, 32 deletions
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 <typename T, int S> + 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 <typename T, int S> + 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. |