From a47dcc229d912d4e4bb5afa37220d20451f243a7 Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Thu, 22 Apr 2021 14:41:12 +0100 Subject: Update operator list documentation All the common information for the operators are stored in OperatorList.h. All data type and data layout information for the operators are store in the function header files. Partially resolve: COMPMID-4199 Signed-off-by: Sheri Zhang Change-Id: I272948cfb3f84e42232a82dd84c0158d84642099 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5511 Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- .../runtime/NEON/functions/NEActivationLayer.h | 12 +++++++++ .../runtime/NEON/functions/NEArithmeticAddition.h | 30 +++++++++++++--------- .../runtime/NEON/functions/NEConcatenateLayer.h | 11 ++++++++ .../functions/NEConvertFullyConnectedWeights.h | 9 +++++++ arm_compute/runtime/NEON/functions/NECopy.h | 8 ++++++ .../runtime/NEON/functions/NEDequantizationLayer.h | 17 ++++++++++++ .../NEON/functions/NEDirectConvolutionLayer.h | 10 ++++++++ arm_compute/runtime/NEON/functions/NEFFT1D.h | 8 ++++++ arm_compute/runtime/NEON/functions/NEFFT2D.h | 8 ++++++ .../runtime/NEON/functions/NEFFTConvolutionLayer.h | 8 ++++++ arm_compute/runtime/NEON/functions/NEFill.h | 8 ++++++ arm_compute/runtime/NEON/functions/NEFloor.h | 9 +++++++ arm_compute/runtime/NEON/functions/NEPReluLayer.h | 11 ++++++++ arm_compute/runtime/NEON/functions/NEPermute.h | 9 +++++++ .../NEON/functions/NEPixelWiseMultiplication.h | 18 +++++++++++++ .../runtime/NEON/functions/NEPoolingLayer.h | 12 +++++++++ .../runtime/NEON/functions/NEQuantizationLayer.h | 19 ++++++++++++++ .../runtime/NEON/functions/NEReshapeLayer.h | 8 ++++++ arm_compute/runtime/NEON/functions/NEScale.h | 14 ++++++++++ arm_compute/runtime/NEON/functions/NESlice.h | 10 +++++++- .../runtime/NEON/functions/NEStridedSlice.h | 10 +++++++- arm_compute/runtime/NEON/functions/NETranspose.h | 8 ++++++ 22 files changed, 243 insertions(+), 14 deletions(-) (limited to 'arm_compute/runtime/NEON/functions') diff --git a/arm_compute/runtime/NEON/functions/NEActivationLayer.h b/arm_compute/runtime/NEON/functions/NEActivationLayer.h index ffda8406aa..b39a8d7701 100644 --- a/arm_compute/runtime/NEON/functions/NEActivationLayer.h +++ b/arm_compute/runtime/NEON/functions/NEActivationLayer.h @@ -61,6 +61,18 @@ public: ~NEActivationLayer(); /** [NEActivationLayer snippet] **/ /** Set the input and output tensor. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |QSYMM16 |QSYMM16 | + * |F16 |F16 | + * |F32 |F32 | * * @note If the output tensor is a nullptr or is equal to the input, the activation function will be performed in-place * diff --git a/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h b/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h index 8f9fd27906..734e3502dd 100644 --- a/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h +++ b/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h @@ -51,19 +51,25 @@ public: NEArithmeticAddition &operator=(NEArithmeticAddition &&); /** Initialise the kernel's inputs, output and conversion policy. * - * Valid configurations (Input1,Input2) -> Output : + * Valid data layouts: + * - NHWC + * - NCHW * - * - (U8,U8) -> U8 - * - (U8,U8) -> S16 - * - (S16,U8) -> S16 - * - (U8,S16) -> S16 - * - (S16,S16) -> S16 - * - (S32,S32) -> S32 - * - (F16,F16) -> F16 - * - (F32,F32) -> F32 - * - (QASYMM8,QASYMM8) -> QASYMM8 - * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED - * - (QSYMM16,QSYMM16) -> QSYMM16 + * Valid data type configurations: + * |src0 |src1 |dst | + * |:--------------|:--------------|:--------------| + * |QASYMM8 |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |QSYMM16 |QSYMM16 |QASYMM16 | + * |QSYMM16 |QSYMM16 |S32 | + * |U8 |U8 |U8 | + * |U8 |U8 |S16 | + * |U8 |S16 |S16 | + * |S16 |U8 |S16 | + * |S16 |S16 |S16 | + * |S32 |S32 |S32 | + * |F16 |F16 |F16 | + * |F32 |F32 |F32 | * * @param[in] input1 First tensor input. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32 * @param[in] input2 Second tensor input. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32 diff --git a/arm_compute/runtime/NEON/functions/NEConcatenateLayer.h b/arm_compute/runtime/NEON/functions/NEConcatenateLayer.h index 6aa724ab0c..dd1c709d76 100644 --- a/arm_compute/runtime/NEON/functions/NEConcatenateLayer.h +++ b/arm_compute/runtime/NEON/functions/NEConcatenateLayer.h @@ -54,6 +54,17 @@ public: /** Default move assignment operator */ NEConcatenateLayer &operator=(NEConcatenateLayer &&); /** Initialise the kernel's inputs vector and output. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |F16 |F16 | + * |F32 |F32 | * * @note Input and output tensor dimensions preconditions defer depending on the concatenation axis. * @note Preconditions can be found respectively at @ref cpu::kernels::CpuConcatenateWidthKernel, @ref cpu::kernels::CpuConcatenateHeightKernel, diff --git a/arm_compute/runtime/NEON/functions/NEConvertFullyConnectedWeights.h b/arm_compute/runtime/NEON/functions/NEConvertFullyConnectedWeights.h index f9ce66db13..218877d421 100644 --- a/arm_compute/runtime/NEON/functions/NEConvertFullyConnectedWeights.h +++ b/arm_compute/runtime/NEON/functions/NEConvertFullyConnectedWeights.h @@ -50,6 +50,15 @@ public: /** Default destructor */ ~NEConvertFullyConnectedWeights(); /** Initialize the function. + * + * Valid data layouts: + * - NHWC + * - NCHW + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |All |All | * * @param[in] input Source weights tensor to convert. Must be 2 dimensional. Data types supported: All. * @param[out] output The converted weights tensor. Shape and Data Type: Same as @p input. diff --git a/arm_compute/runtime/NEON/functions/NECopy.h b/arm_compute/runtime/NEON/functions/NECopy.h index 56f8bd9803..ee02c259f4 100644 --- a/arm_compute/runtime/NEON/functions/NECopy.h +++ b/arm_compute/runtime/NEON/functions/NECopy.h @@ -52,6 +52,14 @@ public: /** Default move assignment operator */ NECopy &operator=(NECopy &&); /** Initialise the function's source and destination. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |All |All | * * @param[in] input Source tensor. Data types supported: All * @param[out] output Output tensor. Data types supported: Same as @p input. diff --git a/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h b/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h index a18566e6ca..dfec835f45 100644 --- a/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h +++ b/arm_compute/runtime/NEON/functions/NEDequantizationLayer.h @@ -52,6 +52,23 @@ public: /** Default move assignment operator */ NEDequantizationLayer &operator=(NEDequantizationLayer &&) = default; /** Configure the kernel. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------------------|:--------------| + * |QASYMM8 |F16 | + * |QASYMM8 |F32 | + * |QASYMM8_SIGNED |F16 | + * |QASYMM8_SIGNED |F32 | + * |QSYMM8_PER_CHANNEL |F16 | + * |QSYMM8_PER_CHANNEL |F32 | + * |QSYMM8 |F16 | + * |QSYMM8 |F32 | + * |QSYMM16 |F16 | + * |QSYMM16 |F32 | * * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/QSYMM8/QSYMM16. * @param[out] output Destination tensor with the same dimensions of input. Data type supported: F16/F32. diff --git a/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h index fc4017e635..82cabed6c9 100644 --- a/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h +++ b/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h @@ -57,6 +57,16 @@ public: /** Default destructor */ ~NEDirectConvolutionLayer(); /** Set the input, weights, biases and output tensors. + * + * Valid data layouts: + * - NHWC + * - NCHW + * + * Valid data type configurations: + * |src0 |src1 |src2 |dst | + * |:------|:------|:------|:------| + * |F16 |F16 |F16 |F16 | + * |F32 |F32 |F32 |F32 | * * @note: DirectConvolution only works in the following configurations: * 1x1 convolution with stride_x = 1/2/3, stride_y = 1/2/3 data type = F16/F32 diff --git a/arm_compute/runtime/NEON/functions/NEFFT1D.h b/arm_compute/runtime/NEON/functions/NEFFT1D.h index a533aa7f48..9654b1e604 100644 --- a/arm_compute/runtime/NEON/functions/NEFFT1D.h +++ b/arm_compute/runtime/NEON/functions/NEFFT1D.h @@ -62,6 +62,14 @@ public: /** Default destructor */ ~NEFFT1D(); /** Initialise the function's source and destinations. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |F32 |F32 | * * @param[in] input Source tensor. Data types supported: F32. Number of channels supported: 1 (real tensor) or 2 (complex tensor). * @param[out] output Destination tensor. Data types and data layouts supported: Same as @p input. diff --git a/arm_compute/runtime/NEON/functions/NEFFT2D.h b/arm_compute/runtime/NEON/functions/NEFFT2D.h index ce84a85105..57f38d1942 100644 --- a/arm_compute/runtime/NEON/functions/NEFFT2D.h +++ b/arm_compute/runtime/NEON/functions/NEFFT2D.h @@ -57,6 +57,14 @@ public: /** Default destructor */ ~NEFFT2D(); /** Initialise the function's source and destinations + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |F32 |F32 | * * @param[in] input Source tensor. Data types supported: F32. * @param[out] output Destination tensor. Data types and data layouts supported: Same as @p input. diff --git a/arm_compute/runtime/NEON/functions/NEFFTConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEFFTConvolutionLayer.h index 213fa6093b..c5f4d45b6b 100644 --- a/arm_compute/runtime/NEON/functions/NEFFTConvolutionLayer.h +++ b/arm_compute/runtime/NEON/functions/NEFFTConvolutionLayer.h @@ -72,6 +72,14 @@ public: /** Default destructor */ ~NEFFTConvolutionLayer(); /** Set the input and output tensors. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |F32 |F32 | * * @note: This function only works with any square kernel size and unit strides for both NCHW and NHWC data layout * diff --git a/arm_compute/runtime/NEON/functions/NEFill.h b/arm_compute/runtime/NEON/functions/NEFill.h index ba5d020496..e923ce33e1 100644 --- a/arm_compute/runtime/NEON/functions/NEFill.h +++ b/arm_compute/runtime/NEON/functions/NEFill.h @@ -52,6 +52,14 @@ public: /** Default move assignment operator */ NEFill &operator=(NEFill &&); /** Initialize the function + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |All |All | * * @param[in,out] tensor Source tensor. Data types supported: All * @param[in] constant_value Constant value to use to fill tensor. diff --git a/arm_compute/runtime/NEON/functions/NEFloor.h b/arm_compute/runtime/NEON/functions/NEFloor.h index 9560eb9169..4d47b068db 100644 --- a/arm_compute/runtime/NEON/functions/NEFloor.h +++ b/arm_compute/runtime/NEON/functions/NEFloor.h @@ -53,6 +53,15 @@ public: /** Destructor */ ~NEFloor(); /** Set the source, destination of the kernel + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |F32 |F32 | + * |F16 |F16 | * * @param[in] input Source tensor. Data type supported: F16/F32. * @param[out] output Destination tensor. Same as @p input diff --git a/arm_compute/runtime/NEON/functions/NEPReluLayer.h b/arm_compute/runtime/NEON/functions/NEPReluLayer.h index b07febfe7f..81d5fd162c 100644 --- a/arm_compute/runtime/NEON/functions/NEPReluLayer.h +++ b/arm_compute/runtime/NEON/functions/NEPReluLayer.h @@ -54,6 +54,17 @@ public: /** Default move assignment operator */ NEPReluLayer &operator=(NEPReluLayer &&); /** Set the input and output tensor. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |F16 |F16 | + * |F32 |F32 | * * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. * @param[in] alpha Source alpha tensor. Data types supported: same of @p input. diff --git a/arm_compute/runtime/NEON/functions/NEPermute.h b/arm_compute/runtime/NEON/functions/NEPermute.h index 2508458a3d..c863fde0ac 100644 --- a/arm_compute/runtime/NEON/functions/NEPermute.h +++ b/arm_compute/runtime/NEON/functions/NEPermute.h @@ -53,6 +53,15 @@ public: /** Default move assignment operator */ NEPermute &operator=(NEPermute &&) = default; /** Configure the permute function + * + * Valid data layouts: + * - NHWC + * - NCHW + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |All |All | * * @note Arbitrary permutation vectors are supported with rank not greater than 4 * diff --git a/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h b/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h index 6f4cce3cde..f8074e791a 100644 --- a/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h +++ b/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h @@ -51,6 +51,24 @@ public: /** Default move assignment operator */ NEPixelWiseMultiplication &operator=(NEPixelWiseMultiplication &&) = default; /** Initialise the kernel's inputs, output and convertion policy. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src0 |src1 |dst | + * |:--------------|:--------------|:--------------| + * |QASYMM8 |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |QSYMM16 |QSYMM16 |QASYMM16 | + * |QSYMM16 |QSYMM16 |S32 | + * |U8 |U8 |U8 | + * |U8 |U8 |S16 | + * |U8 |S16 |S16 | + * |S16 |U8 |S16 | + * |S16 |S16 |S16 | + * |F16 |F16 |F16 | + * |F32 |S32 |F32 | * * @note For @p scale equal to 1/255 only round to nearest even (implemented as round half up) is supported. * For all other scale values only round to zero (implemented as round towards minus infinity) is supported. diff --git a/arm_compute/runtime/NEON/functions/NEPoolingLayer.h b/arm_compute/runtime/NEON/functions/NEPoolingLayer.h index cb136ebca9..851dc0ca32 100644 --- a/arm_compute/runtime/NEON/functions/NEPoolingLayer.h +++ b/arm_compute/runtime/NEON/functions/NEPoolingLayer.h @@ -58,6 +58,18 @@ public: /** Default destructor */ ~NEPoolingLayer(); /** Set the input and output tensors. + * + * Valid data layouts: + * - NHWC + * - NCHW + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |F16 |F16 | + * |F32 |F32 | * * @note F16 is supported for pool sizes 2 and 3 only * diff --git a/arm_compute/runtime/NEON/functions/NEQuantizationLayer.h b/arm_compute/runtime/NEON/functions/NEQuantizationLayer.h index 9e2d9ecf24..a7fadfc7cd 100644 --- a/arm_compute/runtime/NEON/functions/NEQuantizationLayer.h +++ b/arm_compute/runtime/NEON/functions/NEQuantizationLayer.h @@ -51,6 +51,25 @@ public: /** Default move assignment operator */ NEQuantizationLayer &operator=(NEQuantizationLayer &&) = default; /** Set the input and output tensors. + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8 |QASYMM8_SIGNED | + * |QASYMM8 |QASYMM16 | + * |QASYMM8_SIGNED |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |QASYMM8_SIGNED |QASYMM16 | + * |F16 |QASYMM8 | + * |F16 |QASYMM8_SIGNED | + * |F16 |QASYMM16 | + * |F32 |QASYMM8 | + * |F32 |QASYMM8_SIGNED | + * |F32 |QASYMM16 | * * @param[in] input Source tensor. The dimensions over the third will be interpreted as batches. Data types supported: QASYMM8/QASYMM8_SIGNED/F32/F16. * @param[out] output Destination tensor with the same dimensions of input. Data types supported: QASYMM8/QASYMM8_SIGNED/QASYMM16 diff --git a/arm_compute/runtime/NEON/functions/NEReshapeLayer.h b/arm_compute/runtime/NEON/functions/NEReshapeLayer.h index b8c0a841bc..3e6e33f797 100644 --- a/arm_compute/runtime/NEON/functions/NEReshapeLayer.h +++ b/arm_compute/runtime/NEON/functions/NEReshapeLayer.h @@ -51,6 +51,14 @@ public: /** Default move assignment operator */ NEReshapeLayer &operator=(NEReshapeLayer &&); /** Initialise the kernel's inputs and outputs + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |All |All | * * @param[in] input Input tensor. Data type supported: All * @param[out] output Output tensor. Data type supported: Same as @p input diff --git a/arm_compute/runtime/NEON/functions/NEScale.h b/arm_compute/runtime/NEON/functions/NEScale.h index 45658a7cd3..233ee2969e 100644 --- a/arm_compute/runtime/NEON/functions/NEScale.h +++ b/arm_compute/runtime/NEON/functions/NEScale.h @@ -47,6 +47,20 @@ public: ~NEScale(); ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(NEScale); /** Initialize the function's source, destination, interpolation type and border_mode. + * + * Valid data layouts: + * - NHWC + * - NCHW + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |F16 |F16 | + * |F32 |F32 | + * |U8 |U8 | + * |S16 |S16 | * * @param[in, out] input Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/U8/S16/F16/F32. (Written to only for @p border_mode != UNDEFINED) * @param[out] output Destination tensor. Data type supported: Same as @p input. All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane. diff --git a/arm_compute/runtime/NEON/functions/NESlice.h b/arm_compute/runtime/NEON/functions/NESlice.h index 28628778cb..214ffa512c 100644 --- a/arm_compute/runtime/NEON/functions/NESlice.h +++ b/arm_compute/runtime/NEON/functions/NESlice.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -88,6 +88,14 @@ public: NESlice &operator=(NESlice &&); /** Configure kernel + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |All |All | * * @note Supported tensor rank: up to 4 * @note Start indices must be non-negative. 0 <= starts[i] diff --git a/arm_compute/runtime/NEON/functions/NEStridedSlice.h b/arm_compute/runtime/NEON/functions/NEStridedSlice.h index f9c94f5301..7ba6a52a58 100644 --- a/arm_compute/runtime/NEON/functions/NEStridedSlice.h +++ b/arm_compute/runtime/NEON/functions/NEStridedSlice.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -94,6 +94,14 @@ public: NEStridedSlice &operator=(NEStridedSlice &&); /** Configure kernel + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |All |All | * * @note Supported tensor rank: up to 4 * diff --git a/arm_compute/runtime/NEON/functions/NETranspose.h b/arm_compute/runtime/NEON/functions/NETranspose.h index 78916f67b7..581fe74309 100644 --- a/arm_compute/runtime/NEON/functions/NETranspose.h +++ b/arm_compute/runtime/NEON/functions/NETranspose.h @@ -53,6 +53,14 @@ public: /** Default move assignment operator */ NETranspose &operator=(NETranspose &&) = default; /** Initialise the kernel's inputs and output + * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:------|:------| + * |All |All | * * @param[in] input Input tensor. Data types supported: All * @param[out] output Output tensor. Data type supported: Same as @p input -- cgit v1.2.1