From fcf6f4e5a94ff8a16efe3171bf36ca69840cd3c5 Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Thu, 25 Jun 2020 20:01:00 +0100 Subject: COMPMID-3477: Remove padding from NEPixelWiseMultiplicationKernel Remove padding from all NEPixelWiseMultiplicationKernel functions. Add test case for U8_U8_S16(input1,input2,output). Add reference code for U8_U8_S16(input1,input2,output). Remove window shrink test from NormalizationLayer. Signed-off-by: Sheri Zhang Change-Id: I28d89790c5527a42f918814a0ee3d6ec4c273532 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3468 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio --- .../NEON/kernels/NEPixelWiseMultiplicationKernel.h | 39 ++++++++++------------ .../NEON/functions/NEPixelWiseMultiplication.h | 3 +- 2 files changed, 20 insertions(+), 22 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h b/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h index 1a9dd6be2e..3cb0874a2f 100644 --- a/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h +++ b/arm_compute/core/NEON/kernels/NEPixelWiseMultiplicationKernel.h @@ -100,38 +100,36 @@ public: // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; - BorderSize border_size() const override; private: /** Common signature for all the specialised multiplication functions with integer scaling factor * - * @param[in] input1_ptr Pointer to the first input tensor. - * @param[in] input2_ptr Pointer to the second input tensor. - * @param[out] output_ptr Pointer to the output tensor. - * @param[in] scale Integer scale factor. + * @param[in] in1 Input1 tensor object. + * @param[in] in2 Input2 tensor object. + * @param[out] out Output tensor object. + * @param[in] window Region on which to execute the kernel + * @param[in] scale Integer scale factor. */ - using MulFunctionInt = void(const void *__restrict input1_ptr, const void *__restrict input2_ptr, void *__restrict output_ptr, int scale); + using MulFunctionInt = void(const ITensor *in1, const ITensor *in2, ITensor *out, const Window &window, int scale); /** Common signature for all the specialised multiplication functions with float scaling factor * - * @param[in] input1_ptr Pointer to the first input tensor. - * @param[in] input2_ptr Pointer to the second input tensor. - * @param[out] output_ptr Pointer to the output tensor. - * @param[in] scale Float scale factor. + * @param[in] in1 Input1 tensor object. + * @param[in] in2 Input2 tensor object. + * @param[out] out Output tensor object. + * @param[in] window Region on which to execute the kernel + * @param[in] scale Float scale factor. */ - using MulFunctionFloat = void(const void *__restrict input1_ptr, const void *__restrict input2_ptr, void *__restrict output_ptr, float scale); + using MulFunctionFloat = void(const ITensor *in1, const ITensor *in2, ITensor *out, const Window &window, float scale); /** Common signature for all the specialised QASYMM8 multiplication functions with float scaling factor * - * @param[in] input1_ptr Pointer to the first input tensor. - * @param[in] input2_ptr Pointer to the second input tensor. - * @param[out] output_ptr Pointer to the output tensor. - * @param[in] scale Float scale factor. - * @param[in] input1_qua_info Quantization Info of tensor input1. - * @param[in] input2_qua_info Quantization Info of tensor input2. - * @param[in] output_qua_info Quantization Info of tensor output. + * @param[in] in1 Input1 tensor object. + * @param[in] in2 Input2 tensor object. + * @param[out] out Output tensor object. + * @param[in] window Region on which to execute the kernel + * @param[in] scale Float scale factor. * */ - using MulFunctionQuantized = void(const void *__restrict input1_ptr, const void *__restrict input2_ptr, void *__restrict output_ptr, float scale, - const UniformQuantizationInfo &input1_qua_info, const UniformQuantizationInfo &input2_qua_info, const UniformQuantizationInfo &output_qua_info); + using MulFunctionQuantized = void(const ITensor *in1, const ITensor *in2, ITensor *out, const Window &window, float scale); MulFunctionFloat *_func_float; MulFunctionInt *_func_int; @@ -143,7 +141,6 @@ private: ITensor *_output; float _scale; int _scale_exponent; - bool _run_optimized_qasymm8; }; /** Interface for the complex pixelwise multiplication kernel. */ diff --git a/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h b/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h index 2b31032931..d84dff2c13 100644 --- a/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h +++ b/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h @@ -26,13 +26,14 @@ #include "arm_compute/core/Types.h" #include "arm_compute/runtime/NEON/INESimpleFunction.h" +#include "arm_compute/runtime/NEON/INESimpleFunctionNoBorder.h" namespace arm_compute { class ITensor; /** Basic function to run @ref NEPixelWiseMultiplicationKernel */ -class NEPixelWiseMultiplication : public INESimpleFunction +class NEPixelWiseMultiplication : public INESimpleFunctionNoBorder { public: /** Initialise the kernel's inputs, output and convertion policy. -- cgit v1.2.1