aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2019-02-25 13:50:11 +0000
committerManuel Bottini <manuel.bottini@arm.com>2019-03-05 09:46:16 +0000
commit6a2b6e835459ee91dbdf86be8dfdec0bc2421a84 (patch)
treef9324f478f293a5d76a9c8bcc23d10814f406809 /arm_compute
parentfc1da1391679c51209c611e95d60569ce4da15cb (diff)
downloadComputeLibrary-6a2b6e835459ee91dbdf86be8dfdec0bc2421a84.tar.gz
COMPMID-2010: Add support for QASYMM8 in NEArithmeticSubtractionKernel
Change-Id: Ica65d5a13f5670d525bbb961a870b23a21d093d9 Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/807 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/NEON/kernels/NEArithmeticSubtractionKernel.h41
-rw-r--r--arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h20
2 files changed, 32 insertions, 29 deletions
diff --git a/arm_compute/core/NEON/kernels/NEArithmeticSubtractionKernel.h b/arm_compute/core/NEON/kernels/NEArithmeticSubtractionKernel.h
index 64ad6e072d..937cee4a9d 100644
--- a/arm_compute/core/NEON/kernels/NEArithmeticSubtractionKernel.h
+++ b/arm_compute/core/NEON/kernels/NEArithmeticSubtractionKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -56,26 +56,29 @@ public:
*
* Valid configurations (Input1,Input2) -> Output :
*
- * - (U8,U8) -> U8
- * - (U8,U8) -> S16
- * - (S16,U8) -> S16
- * - (U8,S16) -> S16
- * - (S16,S16) -> S16
- * - (F16,F16) -> F16
- * - (F32,F32) -> F32
+ * - (U8,U8) -> U8
+ * - (U8,U8) -> S16
+ * - (QASYMM8, QASYMM8) -> QASYMM8
+ * - (S16,U8) -> S16
+ * - (U8,S16) -> S16
+ * - (S16,S16) -> S16
+ * - (F16,F16) -> F16
+ * - (F32,F32) -> F32
*
- * @param[in] input1 An input tensor. Data types supported: U8/S16/F16/F32
- * @param[in] input2 An input tensor. Data types supported: U8/S16/F16/F32
- * @param[out] output The output tensor. Data types supported: U8/S16/F16/F32.
- * @param[in] policy Overflow policy.
+ * @param[in] input1 An input tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] input2 An input tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[out] output The output tensor. Data types supported: U8/QASYMM8/S16/F16/F32.
+ * @param[in] policy Overflow policy. Convert policy cannot be WRAP if datatype is QASYMM8
*/
void configure(const ITensor *input1, const ITensor *input2, ITensor *output, ConvertPolicy policy);
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticSubtractionKernel
*
- * @param[in] input1 First tensor input. Data types supported: U8/S16/F16/F32
- * @param[in] input2 Second tensor input. Data types supported: U8/S16/F16/F32
- * @param[in] output Output tensor. Data types supported: U8/S16/F16/F32
- * @param[in] policy Policy to use to handle overflow.
+ * @note Convert policy cannot be WRAP if datatype is QASYMM8
+ *
+ * @param[in] input1 First tensor input. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] input2 Second tensor input. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] output Output tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] policy Policy to use to handle overflow. Convert policy cannot be WRAP if datatype is QASYMM8
*
* @return a status
*/
@@ -88,9 +91,9 @@ public:
private:
/** Common signature for all the specialised sub functions
*
- * @param[in] input1 An input tensor. Data types supported: U8/S16/F16/F32
- * @param[in] input2 An input tensor. Data types supported: U8/S16/F16/F32
- * @param[out] output The output tensor. Data types supported: U8/S16/F16/F32.
+ * @param[in] input1 An input tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] input2 An input tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[out] output The output tensor. Data types supported: U8/QASYMM8/S16/F16/F32.
* @param[in] window Region on which to execute the kernel.
*/
using SubFunction = void(const ITensor *input1, const ITensor *input2, ITensor *output, const Window &window);
diff --git a/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h b/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h
index 541756cd2c..e6ff4458f0 100644
--- a/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h
+++ b/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -33,7 +33,7 @@ class ITensor;
/** Basic function to run @ref NEArithmeticSubtractionKernel
*
- * @note The tensor data type for the inputs must be U8/S16/F16/F32.
+ * @note The tensor data type for the inputs must be U8/QASYMM8/S16/F16/F32.
* @note The function performs an arithmetic subtraction between two tensors.
*
* This function calls the following kernels:
@@ -45,18 +45,18 @@ class NEArithmeticSubtraction : public INESimpleFunction
public:
/** Initialise the kernel's inputs, output and conversion policy.
*
- * @param[in] input1 First tensor input. Data types supported: U8/S16/F16/F32
- * @param[in] input2 Second tensor input. Data types supported: U8/S16/F16/F32
- * @param[out] output Output tensor. Data types supported: U8/S16/F16/F32
- * @param[in] policy Policy to use to handle overflow.
+ * @param[in] input1 First tensor input. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] input2 Second tensor input. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[out] output Output tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] policy Policy to use to handle overflow. Convert policy cannot be WRAP if datatype is QASYMM8.
*/
void configure(ITensor *input1, ITensor *input2, ITensor *output, ConvertPolicy policy);
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticSubtraction
*
- * @param[in] input1 First tensor input. Data types supported: U8/S16/F16/F32
- * @param[in] input2 Second tensor input. Data types supported: U8/S16/F16/F32
- * @param[in] output Output tensor. Data types supported: U8/S16/F16/F32
- * @param[in] policy Policy to use to handle overflow.
+ * @param[in] input1 First tensor input. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] input2 Second tensor input. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] output Output tensor. Data types supported: U8/QASYMM8/S16/F16/F32
+ * @param[in] policy Policy to use to handle overflow. Convert policy cannot be WRAP if datatype is QASYMM8
*
* @return a status
*/