From 8c837ca85c06c53ccca20937be9dfd74d00d597a Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 7 Jan 2020 15:06:41 +0000 Subject: COMPMID-2766: Add support for QASYMM8_SIGNED in NEDepthwiseConvolutionLayer This patch also adds support for QASYMM8_SIGNED in the generic functions that uses NEDepthwiseConvolutionLayerNativeKernel. Change-Id: I74a99e1476cb1ebd2078e076ab2bea703949527b Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/2552 Reviewed-by: Giorgio Arena Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- .../kernels/NEDepthwiseConvolutionLayerNativeKernel.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h') diff --git a/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h b/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h index 682c3c9acf..1303cf9021 100644 --- a/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h +++ b/arm_compute/core/NEON/kernels/NEDepthwiseConvolutionLayerNativeKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 ARM Limited. + * Copyright (c) 2019-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -25,6 +25,7 @@ #define ARM_COMPUTE_NEDEPTHWISECONVOLUTIONLAYERNATIVEKERNEL_H #include "arm_compute/core/NEON/INEKernel.h" +#include "arm_compute/core/utils/misc/Requires.h" #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC #include @@ -57,11 +58,11 @@ public: * * @note Supported data layouts: NHWC * - * @param[in] input Source tensor. DataType supported: QASYMM8/F16/F32. + * @param[in] input Source tensor. DataType supported: QASYMM8/QASYMM8_SIGNED/F16/F32. * @param[in] weights Weights tensor. This is a 3D tensor with dimensions [IFM, W, H]. - * Data type supported: Same as @p input or QASYMM8/QSYMM8_PER_CHANNEL when @p input is QASYMM8. + * Data type supported: Same as @p input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when @p input is QASYMM8/QASYMM8_SIGNED. * @param[in] biases Biases tensor. A 1D tensor with dimensions [IFM]. Must be nullptr if not needed. - * Data type supported: Same as @p input, S32 when input is QASYMM8. + * Data type supported: Same as @p input, S32 when input is QASYMM8/QASYMM8_SIGNED. * @param[out] output Destination tensor. Data type supported: Same as @p input. * @param[in] conv_info Padding and stride information to use for the convolution. * @param[in] depth_multiplier (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. @@ -74,11 +75,11 @@ public: * * @note Supported data layouts: NHWC * - * @param[in] input Source tensor info. DataType supported: QASYMM8/F16/F32. + * @param[in] input Source tensor info. DataType supported: QASYMM8/QASYMM8_SIGNED/F16/F32. * @param[in] weights Weights tensor info. This is a 3D tensor with dimensions [IFM, W, H]. - * Data type supported: Same as @p input or QASYMM8/QSYMM8_PER_CHANNEL when @p input is QASYMM8. + * Data type supported: Same as @p input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when @p input is QASYMM8/QASYMM8_SIGNED. * @param[in] biases Biases tensor info. A 1D tensor with dimensions [IFM]. Must be nullptr if not needed. - * Data type supported: Same as @p input, S32 when input is QASYMM8. + * Data type supported: Same as @p input, S32 when input is QASYMM8/QASYMM8_SIGNED. * @param[in] output Destination tensor info. Data type supported: Same as @p input. * @param[in] conv_info Padding and stride information to use for the convolution. * @param[in] depth_multiplier (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. @@ -102,7 +103,7 @@ private: int >::type = 0 > void run_depthwise(const Window &window); - template ::value, int>::type = 0> + template < typename T, typename TW, int S, bool has_biases, bool is_per_channel, REQUIRES_TA(std::is_same::value || std::is_same::value) > void run_depthwise(const Window &window); /** Common signature for all the specialised depthwise convolution native functions -- cgit v1.2.1