diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-07-06 11:27:21 +0100 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-07-20 12:39:29 +0000 |
commit | f6f7876e9ee8b58a8a6b335b032d554412fa3983 (patch) | |
tree | 669c86bfc60ec99965151022a4112c53116b06c0 /arm_compute/core/CL/kernels | |
parent | 954051f449788f22eb605b126f71af923950ca29 (diff) | |
download | ComputeLibrary-f6f7876e9ee8b58a8a6b335b032d554412fa3983.tar.gz |
COMPMID-3532: Align data type support between doxygen and implementation - CL
Also removes some unused code.
Change-Id: I85687c40999c3cdf9e6fccfcd020b0901a9515fe
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3581
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/CL/kernels')
14 files changed, 94 insertions, 232 deletions
diff --git a/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h b/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h index 5aec25259f..c4d0297aef 100644 --- a/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h +++ b/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h @@ -26,8 +26,6 @@ #include "arm_compute/core/CL/ICLKernel.h" -#include <cstdint> - namespace arm_compute { class ICLTensor; @@ -136,7 +134,7 @@ public: CLEdgeTraceKernel &operator=(const CLEdgeTraceKernel &) = delete; /** Initialise the kernel's source, destination and border mode. * - * @param[in] input Source tensor. Data types supported: U8. + * @param[in] input Source tensor. Data types supported: U16/U32. * @param[out] output Destination tensor. Data types supported: U8. * @param[in] upper_thr Upper threshold used for the hysteresis * @param[in] lower_thr Lower threshold used for the hysteresis @@ -154,7 +152,7 @@ public: /** Initialise the kernel's source, destination and border mode. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8. + * @param[in] input Source tensor. Data types supported: U16/U32. * @param[out] output Destination tensor. Data types supported: U8. * @param[in] upper_thr Upper threshold used for the hysteresis * @param[in] lower_thr Lower threshold used for the hysteresis diff --git a/arm_compute/core/CL/kernels/CLChannelCombineKernel.h b/arm_compute/core/CL/kernels/CLChannelCombineKernel.h index 3ba426cbfa..f9c33df7c1 100644 --- a/arm_compute/core/CL/kernels/CLChannelCombineKernel.h +++ b/arm_compute/core/CL/kernels/CLChannelCombineKernel.h @@ -57,7 +57,7 @@ public: * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. * @param[in] plane3 The 2D plane that forms channel 3. Must be of U8 format. - * @param[out] output The single planar output tensor. + * @param[out] output The single planar output tensor. Supported formats: RGB888/RGBA8888/YUYV422/UYVY422. */ void configure(const ICLTensor *plane0, const ICLTensor *plane1, const ICLTensor *plane2, const ICLTensor *plane3, ICLTensor *output); /** Configure function's inputs and outputs. @@ -75,7 +75,7 @@ public: * @param[in] plane0 The 2D plane that forms channel 0. Must be of U8 format. * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. - * @param[out] output The multi planar output tensor. + * @param[out] output The multi planar output tensor. Supported formats: RGB888/RGBA8888/YUYV422/UYVY422. */ void configure(const ICLImage *plane0, const ICLImage *plane1, const ICLImage *plane2, ICLMultiImage *output); /** Configure function's inputs and outputs. @@ -84,7 +84,7 @@ public: * @param[in] plane0 The 2D plane that forms channel 0. Must be of U8 format. * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. - * @param[out] output The multi planar output tensor. + * @param[out] output The multi planar output tensor. Supported formats: RGB888/RGBA8888/YUYV422/UYVY422. */ void configure(const CLCompileContext &compile_context, const ICLImage *plane0, const ICLImage *plane1, const ICLImage *plane2, ICLMultiImage *output); diff --git a/arm_compute/core/CL/kernels/CLConvolutionKernel.h b/arm_compute/core/CL/kernels/CLConvolutionKernel.h index 4bf7c754b0..0f500fb63a 100644 --- a/arm_compute/core/CL/kernels/CLConvolutionKernel.h +++ b/arm_compute/core/CL/kernels/CLConvolutionKernel.h @@ -108,7 +108,7 @@ public: * * @param[in] compile_context The compile context to be used. * @param[in] input Source tensor. Data types supported: U8. - * @param[out] output Destination tensor, Data types supported: S16. + * @param[out] output Destination tensor, Data types supported: U16/S16/S32. * @param[in] conv Convolution matrix to apply to the input tensor. * @param[in] border_undefined True if the border mode is undefined. False if it's replicate or constant. */ @@ -135,7 +135,7 @@ class CLSeparableConvolutionVertKernel : public ICLSimple2DKernel public: /** Initialise the kernel's input, output and border mode. * - * @param[in] input Source tensor. Data types supported: S16. + * @param[in] input Source tensor. Data types supported: U16/S16/S32. * @param[out] output Destination tensor, Data types supported: U8, S16. * @param[in] conv Convolution matrix to apply to the input tensor. * @param[in] scale Scale of the convolution matrix. @@ -146,7 +146,7 @@ public: /** Initialise the kernel's input, output and border mode. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: S16. + * @param[in] input Source tensor. Data types supported: U16/S16/S32. * @param[out] output Destination tensor, Data types supported: U8, S16. * @param[in] conv Convolution matrix to apply to the input tensor. * @param[in] scale Scale of the convolution matrix. diff --git a/arm_compute/core/CL/kernels/CLCopyKernel.h b/arm_compute/core/CL/kernels/CLCopyKernel.h index 1f0b5a40e4..11a6d54e90 100644 --- a/arm_compute/core/CL/kernels/CLCopyKernel.h +++ b/arm_compute/core/CL/kernels/CLCopyKernel.h @@ -47,7 +47,7 @@ public: CLCopyKernel &operator=(CLCopyKernel &&) = default; /** Initialize the kernel's input, output. * - * @param[in] input Source tensor. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Destination tensor. Data types supported: same as @p input. * @param[in] padding (Optional) Padding to be applied to the input tensor * @param[in] output_window (Optional) Window to be used in case only copying into part of a tensor. Default is nullptr. @@ -56,7 +56,7 @@ public: /** Initialize the kernel's input, output. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Destination tensor. Data types supported: same as @p input. * @param[in] padding (Optional) Padding to be applied to the input tensor * @param[in] output_window (Optional) Window to be used in case only copying into part of a tensor. Default is nullptr. @@ -64,7 +64,7 @@ public: void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, const PaddingList &padding = PaddingList(), Window *output_window = nullptr); /** Static function to check if given info will lead to a valid configuration of @ref CLCopyKernel * - * @param[in] input Source tensor info. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32. + * @param[in] input Source tensor info. Data types supported: All. * @param[in] output Destination tensor info. Data types supported: same as @p input. * @param[in] padding (Optional) Padding to be applied to the input tensor * @param[in] output_window (Optional) Window to be used in case only copying into part of a tensor. Default is nullptr. diff --git a/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h b/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h index d933a7eea5..4ca6c0bf4a 100644 --- a/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h +++ b/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h @@ -40,7 +40,7 @@ public: /** Default move assignment operator. */ /** Initialize the function's source, destination, conv and border_size. * - * @param[in] input Source tensor. DataType supported: QASYMM8/QASYMM8_SIGNED. + * @param[in] input Source tensor. DataType supported: QASYMM8/QASYMM8_SIGNED/F16/F32. * @param[in] weights Weights tensor. A 3D tensor with dimensions [IFM, 3, 3]. * 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. @@ -61,7 +61,7 @@ public: /** Initialize the function's source, destination, conv and border_size. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. DataType supported: QASYMM8/QASYMM8_SIGNED. + * @param[in] input Source tensor. DataType supported: QASYMM8/QASYMM8_SIGNED/F16/F32. * @param[in] weights Weights tensor. A 3D tensor with dimensions [IFM, 3, 3]. * 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. @@ -81,7 +81,7 @@ public: const ICLTensor *output_multipliers = nullptr, const ICLTensor *output_shifts = nullptr) override; /** Static function to check if given info will lead to a valid configuration of @ref CLDepthwiseConvolutionLayer3x3NHWCKernel * - * @param[in] input Source tensor info. DataType supported: QASYMM8/QASYMM8_SIGNED. + * @param[in] input Source tensor info. DataType supported: QASYMM8/QASYMM8_SIGNED/F16/F32. * @param[in] weights Weights tensor info. A 3D tensor with dimensions [IFM, 3, 3]. * 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. diff --git a/arm_compute/core/CL/kernels/CLElementwiseOperationKernel.h b/arm_compute/core/CL/kernels/CLElementwiseOperationKernel.h index 699ff5d7a9..1995aed7b6 100644 --- a/arm_compute/core/CL/kernels/CLElementwiseOperationKernel.h +++ b/arm_compute/core/CL/kernels/CLElementwiseOperationKernel.h @@ -113,7 +113,7 @@ public: /** Static function to check if given info will lead to a valid configuration of @ref CLSaturatedArithmeticOperationKernel * * @param[in] op Arithmetic operation to be executed. - * @param[in] input1 First tensor input. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/QSYMM16/F16/U32/S32/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: Same as @p input1. * @param[in] output Output tensor. Data types supported: Same as @p input1. * @param[in] policy Policy to use to handle overflow. @@ -124,7 +124,7 @@ public: * * @param[in] compile_context The compile context to be used. * @param[in] op Arithmetic operation to be executed. - * @param[in] input1 First tensor input. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/QSYMM16/F16/U32/S32/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: Same as @p input1. * @param[in] output Output tensor. Data types supported: Same as @p input1. * @param[in] policy Policy to use to handle overflow. @@ -136,7 +136,7 @@ public: /** Static function to check if given info will lead to a valid configuration of @ref CLSaturatedArithmeticOperationKernel * * @param[in] op Arithmetic operation to be executed. - * @param[in] input1 First tensor input info. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/QSYMM16/F16/U32/S32/F32. + * @param[in] input1 First tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32. * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1. * @param[in] output Output tensor info. Data types supported: Same as @p input1. * @param[in] policy Policy to use to handle overflow. @@ -170,7 +170,7 @@ public: /** Static function to check if given info will lead to a valid configuration of @ref CLArithmeticOperationKernel * * @param[in] op Arithmetic operation to be executed. - * @param[in] input1 First tensor input. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/QSYMM16/F16/U32/S32/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: Same as @p input1. * @param[in] output Output tensor. Data types supported: Same as @p input1. * @param[in] act_info (Optional) Activation layer information in case of a fused activation. @@ -180,7 +180,7 @@ public: * * @param[in] compile_context The compile context to be used. * @param[in] op Arithmetic operation to be executed. - * @param[in] input1 First tensor input. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/QSYMM16/F16/U32/S32/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: Same as @p input1. * @param[in] output Output tensor. Data types supported: Same as @p input1. * @param[in] act_info (Optional) Activation layer information in case of a fused activation. @@ -191,7 +191,7 @@ public: /** Static function to check if given info will lead to a valid configuration of @ref CLArithmeticOperationKernel * * @param[in] op Arithmetic operation to be executed. - * @param[in] input1 First tensor input info. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/QSYMM16/F16/U32/S32/F32. + * @param[in] input1 First tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32. * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1. * @param[in] output Output tensor info. Data types supported: Same as @p input1. * @param[in] act_info (Optional) Activation layer information in case of a fused activation. diff --git a/arm_compute/core/CL/kernels/CLGEMMLowpReductionKernel.h b/arm_compute/core/CL/kernels/CLGEMMLowpReductionKernel.h index bb7461ca44..6066e2a815 100644 --- a/arm_compute/core/CL/kernels/CLGEMMLowpReductionKernel.h +++ b/arm_compute/core/CL/kernels/CLGEMMLowpReductionKernel.h @@ -48,7 +48,7 @@ public: /** Initialise the kernel's input and output. * - * @param[in] input Input tensor. Data type supported: S8 + * @param[in] input Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8. * @param[out] output Output row-vector of sums of all the entries in each row/col of input tensor. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -60,7 +60,7 @@ public: /** Initialise the kernel's input and output. * * @param[in] compile_context The compile context to be used. - * @param[in] input Input tensor. Data type supported: S8 + * @param[in] input Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8. * @param[out] output Output row-vector of sums of all the entries in each row/col of input tensor. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -85,7 +85,7 @@ class CLGEMMLowpMatrixAReductionKernel : public ICLGEMMLowpReductionKernel public: /** Initialise the kernel's input and output. * - * @param[in] mtx_a Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED + * @param[in] mtx_a Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8. * @param[out] vector_sum_row Output row-vector of sums of all the entries in each row of mtx_a. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -97,7 +97,7 @@ public: /** Initialise the kernel's input and output. * * @param[in] compile_context The compile context to be used. - * @param[in] mtx_a Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED + * @param[in] mtx_a Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8. * @param[out] vector_sum_row Output row-vector of sums of all the entries in each row of mtx_a. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -108,7 +108,7 @@ public: void configure(const CLCompileContext &compile_context, const ICLTensor *mtx_a, ICLTensor *vector_sum_row, const GEMMLowpReductionKernelInfo &info) override; /** Static function to check if given info will lead to a valid configuration of @ref CLGEMMLowpMatrixAReductionKernel * - * @param[in] mtx_a Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED + * @param[in] mtx_a Input tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8. * @param[in] vector_sum_row Output row-vector of sums of all the entries in each row of mtx_a. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -134,7 +134,7 @@ class CLGEMMLowpMatrixBReductionKernel : public ICLGEMMLowpReductionKernel public: /** Initialise the kernel's input and output. * - * @param[in] mtx_b Input tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED + * @param[in] mtx_b Input tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8/QSYMM8_PER_CHANNEL. * @param[out] vector_sum_col Output row-vector of sums of all the entries in each column of mtx_b. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -146,7 +146,7 @@ public: /** Initialise the kernel's input and output. * * @param[in] compile_context The compile context to be used. - * @param[in] mtx_b Input tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED + * @param[in] mtx_b Input tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8/QSYMM8_PER_CHANNEL. * @param[out] vector_sum_col Output row-vector of sums of all the entries in each column of mtx_b. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. @@ -157,7 +157,7 @@ public: void configure(const CLCompileContext &compile_context, const ICLTensor *mtx_b, ICLTensor *vector_sum_col, const GEMMLowpReductionKernelInfo &info) override; /** Static function to check if given info will lead to a valid configuration of @ref CLGEMMLowpMatrixBReductionKernel * - * @param[in] mtx_b Input tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED + * @param[in] mtx_b Input tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8/QSYMM8_PER_CHANNEL. * @param[in] vector_sum_col Output row-vector of sums of all the entries in each column of mtx_b. Data type supported: S32 * @param[in] info Kernel metadata: * - k Number of matrix columns/rows depending on the type of reduction. diff --git a/arm_compute/core/CL/kernels/CLGEMMMatrixAccumulateBiasesKernel.h b/arm_compute/core/CL/kernels/CLGEMMMatrixAccumulateBiasesKernel.h deleted file mode 100644 index 3b4a0be0e8..0000000000 --- a/arm_compute/core/CL/kernels/CLGEMMMatrixAccumulateBiasesKernel.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLGEMMMATRIXACCUMULATEBIASESKERNEL_H -#define ARM_COMPUTE_CLGEMMMATRIXACCUMULATEBIASESKERNEL_H - -#include "arm_compute/core/CL/ICLKernel.h" - -namespace arm_compute -{ -/** Interface to add a bias to each row of the input tensor - * - */ -class CLGEMMMatrixAccumulateBiasesKernel : public ICLKernel -{ -public: - /** Default constructor */ - CLGEMMMatrixAccumulateBiasesKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMMatrixAccumulateBiasesKernel(const CLGEMMMatrixAccumulateBiasesKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMMatrixAccumulateBiasesKernel &operator=(const CLGEMMMatrixAccumulateBiasesKernel &) = delete; - /** Allow instances of this class to be moved */ - CLGEMMMatrixAccumulateBiasesKernel(CLGEMMMatrixAccumulateBiasesKernel &&) = default; - /** Allow instances of this class to be moved */ - CLGEMMMatrixAccumulateBiasesKernel &operator=(CLGEMMMatrixAccumulateBiasesKernel &&) = default; - /** Set the accumulate buffer and the biases of the kernel. - * - * @param[in, out] accum The accumulate tensor to convert. Data types supported: F16/F32 - * @param[in] biases The shared biases tensor to append. It must be 1D tensor. Data types supported: Same as @p input - */ - void configure(ICLTensor *accum, const ICLTensor *biases); - /** Set the accumulate buffer and the biases of the kernel. - * - * @param[in] compile_context The compile context to be used. - * @param[in, out] accum The accumulate tensor to convert. Data types supported: F16/F32 - * @param[in] biases The shared biases tensor to append. It must be 1D tensor. Data types supported: Same as @p input - */ - void configure(const CLCompileContext &compile_context, ICLTensor *accum, const ICLTensor *biases); - /** Static function to check if given info will lead to a valid configuration of @ref CLGEMMMatrixAccumulateBiasesKernel - * - * @param[in] accum The accumulate tensor to convert. Data types supported: F16/F32 - * @param[in] biases The shared biases tensor to append. It must be 1D tensor. Data types supported: Same as @p input - * @param[in] gpu_target GPU target - * - * @return a status - */ - static Status validate(const ITensorInfo *accum, const ITensorInfo *biases, GPUTarget gpu_target); - - // Inherited methods overridden: - void run(const Window &window, cl::CommandQueue &queue) override; - -private: - ICLTensor *_accum; - const ICLTensor *_biases; -}; -} // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMMATRIXACCUMULATEBIASESKERNEL_H */ diff --git a/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h b/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h index 5f1d82ded1..a741b1745a 100644 --- a/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h +++ b/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h @@ -51,9 +51,9 @@ public: * * @note At least one of output1 or output2 must be set. * - * @param[in] gx The input gradient X tensor. Data types supported: S16. - * @param[in] gy The input gradient Y tensor. Data types supported: S16. - * @param[out] magnitude (Optional) The output tensor - Magnitude. Data types supported: S16. + * @param[in] gx The input gradient X tensor. Data types supported: S16/S32. + * @param[in] gy The input gradient Y tensor. Data types supported: S16/S32. + * @param[out] magnitude (Optional) The output tensor - Magnitude. Data types supported: S16/S32. * @param[out] phase (Optional) The output tensor - Phase. Data types supported: U8. * @param[in] mag_type (Optional) Magnitude calculation type. Default: L2NORM. * @param[in] phase_type (Optional) Phase calculation type. Default: SIGNED. @@ -65,9 +65,9 @@ public: * @note At least one of output1 or output2 must be set. * * @param[in] compile_context The compile context to be used. - * @param[in] gx The input gradient X tensor. Data types supported: S16. - * @param[in] gy The input gradient Y tensor. Data types supported: S16. - * @param[out] magnitude (Optional) The output tensor - Magnitude. Data types supported: S16. + * @param[in] gx The input gradient X tensor. Data types supported: S16/S32. + * @param[in] gy The input gradient Y tensor. Data types supported: S16/S32. + * @param[out] magnitude (Optional) The output tensor - Magnitude. Data types supported: S16/S32. * @param[out] phase (Optional) The output tensor - Phase. Data types supported: U8. * @param[in] mag_type (Optional) Magnitude calculation type. Default: L2NORM. * @param[in] phase_type (Optional) Phase calculation type. Default: SIGNED. diff --git a/arm_compute/core/CL/kernels/CLPadLayerKernel.h b/arm_compute/core/CL/kernels/CLPadLayerKernel.h index 3b78bb9834..5bf5841803 100644 --- a/arm_compute/core/CL/kernels/CLPadLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLPadLayerKernel.h @@ -25,7 +25,6 @@ #define ARM_COMPUTE_CLPADLAYERKERNEL_H #include "arm_compute/core/CL/ICLKernel.h" -#include "arm_compute/core/CL/ICLTensor.h" namespace arm_compute { @@ -49,7 +48,7 @@ public: ~CLPadLayerKernel() = default; /** Set the input and output tensor. * - * @param[in] input Source tensor. Data types supported: U8, S8, QASYMM8, QASYMM8_SIGNED, U16, S16, U32, S32, F16, F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Output tensor. Data type supported: same as @p input * @param[in] padding The padding for each spatial dimension of the input tensor. The pair padding[i] * specifies the front and the end padding in the i-th dimension. @@ -73,7 +72,7 @@ public: PaddingMode mode = PaddingMode::CONSTANT); /** Static function to check if given info will lead to a valid configuration of @ref CLPadLayerKernel * - * @param[in] input Source tensor info. Data types supported: U8, S8, QASYMM8, QASYMM8_SIGNED, U16, S16, U32, S32, F16, F32. + * @param[in] input Source tensor info. Data types supported: All. * @param[in] output Output tensor info. Data type supported: same as @p input * @param[in] padding The padding for each spatial dimension of the input tensor. The pair padding[i] * specifies the front and the end padding in the i-th dimension. diff --git a/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h b/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h index bb64060a12..bb98eb83bf 100644 --- a/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h +++ b/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h @@ -48,17 +48,23 @@ public: CLPixelWiseMultiplicationKernel &operator=(CLPixelWiseMultiplicationKernel &&) = default; /** Initialise the kernel's input, output and border mode. * + * Valid configurations (Input1,Input2) -> Output : + * + * - (U8,U8) -> U8 + * - (U8,U8) -> S16 + * - (U8,S16) -> S16 + * - (S16,U8) -> S16 + * - (S16,S16) -> S16 + * - (F16,F16) -> F16 + * - (F32,F32) -> F32 + * - (QASYMM8,QASYMM8) -> QASYMM8 + * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED + * - (QSYMM16,QSYMM16) -> QSYMM16 + * - (QSYMM16,QSYMM16) -> S32 + * * @param[in] input1 An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. - * @param[in] input2 An input tensor. Data types supported: same as @p input1. - * @param[out] output The output tensor, Data types supported: - * - U8, only if both input are U8 - * - QASYMM8, only if both inputs are QASYMM8 - * - QASYMM8_SIGNED, only if both inputs are QASYMM8_SIGNED - * - S16 - * - QSYMM16, only if both inputs are QSYMM16 - * - S32, only if both inputs are QSYMM16 - * - F16 - * - F32 + * @param[in] input2 An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. + * @param[out] output The output tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. * @param[in] scale Scale to apply after multiplication. * Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. * @param[in] overflow_policy Overflow policy. Supported overflow policies: Wrap, Saturate @@ -69,10 +75,24 @@ public: ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info = ActivationLayerInfo()); /** Initialise the kernel's input, output and border mode. * + * Valid configurations (Input1,Input2) -> Output : + * + * - (U8,U8) -> U8 + * - (U8,U8) -> S16 + * - (U8,S16) -> S16 + * - (S16,U8) -> S16 + * - (S16,S16) -> S16 + * - (F16,F16) -> F16 + * - (F32,F32) -> F32 + * - (QASYMM8,QASYMM8) -> QASYMM8 + * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED + * - (QSYMM16,QSYMM16) -> QSYMM16 + * - (QSYMM16,QSYMM16) -> S32 + * * @param[in] compile_context The compile context to be used. * @param[in] input1 An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. - * @param[in] input2 An input tensor. Data types supported: same as @p input1. - * @param[out] output The output tensor, Data types supported: same as @p input1. Note: U8 requires both inputs to be U8. + * @param[in] input2 An input tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. + * @param[out] output The output tensor. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. * @param[in] scale Scale to apply after multiplication. * Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. * @param[in] overflow_policy Overflow policy. Supported overflow policies: Wrap, Saturate @@ -83,17 +103,23 @@ public: ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info = ActivationLayerInfo()); /** Static function to check if given info will lead to a valid configuration of @ref CLPixelWiseMultiplicationKernel * + * Valid configurations (Input1,Input2) -> Output : + * + * - (U8,U8) -> U8 + * - (U8,U8) -> S16 + * - (U8,S16) -> S16 + * - (S16,U8) -> S16 + * - (S16,S16) -> S16 + * - (F16,F16) -> F16 + * - (F32,F32) -> F32 + * - (QASYMM8,QASYMM8) -> QASYMM8 + * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED + * - (QSYMM16,QSYMM16) -> QSYMM16 + * - (QSYMM16,QSYMM16) -> S32 + * * @param[in] input1 An input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. - * @param[in] input2 An input tensor info. Data types supported: same as @p input1. - * @param[in] output The output tensor info, Data types supported: - * - U8, only if both input are U8 - * - QASYMM8, only if both inputs are QASYMM8 - * - QASYMM8_SIGNED, only if both inputs are QASYMM8_SIGNED - * - S16 - * - QSYMM16, only if both inputs are QSYMM16 - * - S32, only if both inputs are QSYMM16 - * - F16 - * - F32 + * @param[in] input2 An input tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. + * @param[in] output The output tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. * @param[in] scale Scale to apply after multiplication. * Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. * @param[in] overflow_policy Overflow policy. Supported overflow policies: Wrap, Saturate diff --git a/arm_compute/core/CL/kernels/CLReorgLayerKernel.h b/arm_compute/core/CL/kernels/CLReorgLayerKernel.h index 279d891497..e3edc9f724 100644 --- a/arm_compute/core/CL/kernels/CLReorgLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLReorgLayerKernel.h @@ -47,7 +47,7 @@ public: CLReorgLayerKernel &operator=(CLReorgLayerKernel &&) = default; /** Initialize the kernel's input, output. * - * @param[in] input Source tensor. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/F16/U32/S32/F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Destination tensor with tensor shape: * [width_input / stride, height_input / stride, channels_input * stride * stride, batch_size]. This means the output has * the same number of input elements. Data types supported: same as @p input. @@ -58,7 +58,7 @@ public: /** Initialize the kernel's input, output. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8/S8/QASYMM8/QASYMM8_SIGNED/U16/S16/F16/U32/S32/F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Destination tensor with tensor shape: * [width_input / stride, height_input / stride, channels_input * stride * stride, batch_size]. This means the output has * the same number of input elements. Data types supported: same as @p input. diff --git a/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h b/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h index 5297af2c1c..f8c1019d53 100644 --- a/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h @@ -27,93 +27,10 @@ #include "arm_compute/core/CL/ICLSimple3DKernel.h" #include "arm_compute/core/KernelDescriptors.h" -#include <tuple> - namespace arm_compute { class ICLTensor; -/** Interface for the identifying the max value of 1D Logits */ -class CLLogits1DMaxKernel : public ICLSimple3DKernel -{ -public: - /** Set the input and output tensors. - * - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32 - * @param[out] output Destination tensor. Data types supported: same as @p input - */ - void configure(const ICLTensor *input, ICLTensor *output); - /** Set the input and output tensors. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32 - * @param[out] output Destination tensor. Data types supported: same as @p input - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output); - /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DMaxKernel - * - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32 - * @param[in] output Destination tensor. Data types supported: same as @p input - * - * @return a status - */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output); -}; - -/** Interface for shifting, exponentiating and summing the logits */ -class CLLogits1DShiftExpSumKernel : public ICLKernel -{ -public: - /** Default constructor */ - CLLogits1DShiftExpSumKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLLogits1DShiftExpSumKernel(const CLLogits1DShiftExpSumKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLLogits1DShiftExpSumKernel &operator=(const CLLogits1DShiftExpSumKernel &) = delete; - /** Allow instances of this class to be moved */ - CLLogits1DShiftExpSumKernel(CLLogits1DShiftExpSumKernel &&) = default; - /** Allow instances of this class to be moved */ - CLLogits1DShiftExpSumKernel &operator=(CLLogits1DShiftExpSumKernel &&) = default; - /** Set the input and output tensors. - * - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32 - * @param[in] max Max values tensor. Data types supported: same as @p input - * @param[out] output Destination tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input - * @param[out] sum Sum of 1D logits tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input - * @param[in] beta (Optional) A scaling factor for the exponent. Defaults to 1.0 - */ - void configure(const ICLTensor *input, const ICLTensor *max, ICLTensor *output, ICLTensor *sum, float beta = 1.0f); - /** Set the input and output tensors. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32 - * @param[in] max Max values tensor. Data types supported: same as @p input - * @param[out] output Destination tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input - * @param[out] sum Sum of 1D logits tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input - * @param[in] beta (Optional) A scaling factor for the exponent. Defaults to 1.0 - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *max, ICLTensor *output, ICLTensor *sum, float beta = 1.0f); - /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DShiftExpSumKernel - * - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32 - * @param[in] max Max values tensor. Data types supported: same as @p input - * @param[in] output Destination tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input - * @param[in] sum Sum of 1D logits tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input - * - * @return a status - */ - static Status validate(const ITensorInfo *input, const ITensorInfo *max, const ITensorInfo *output, const ITensorInfo *sum); - - // Inherited methods overridden: - void run(const Window &window, cl::CommandQueue &queue) override; - -private: - const ICLTensor *_input; - const ICLTensor *_max; - ICLTensor *_output; - ICLTensor *_sum; -}; - /** Interface for max, shifting, exponentiating and summing the logits */ class CLLogits1DMaxShiftExpSumKernel : public ICLKernel { @@ -134,7 +51,7 @@ public: CLLogits1DMaxShiftExpSumKernel &operator=(CLLogits1DMaxShiftExpSumKernel &&) = default; /** Set the input and output tensors. * - * @param[in] input Source tensor. Data types supported: F16/F32 + * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32 * @param[in,out] max Max values tensor. Data types supported: same as @p input * @param[out] output Destination tensor. Data types supported: same as @p input * @param[out] sum Sum of 1D logits tensor. Data types supported: same as @p input @@ -144,7 +61,7 @@ public: /** Set the input and output tensors. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: F16/F32 + * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32 * @param[in,out] max Max values tensor. Data types supported: same as @p input * @param[out] output Destination tensor. Data types supported: same as @p input * @param[out] sum Sum of 1D logits tensor. Data types supported: same as @p input @@ -153,7 +70,7 @@ public: void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *max, ICLTensor *output, ICLTensor *sum, const SoftmaxKernelInfo &info); /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DMaxShiftExpSumKernel * - * @param[in] input Source tensor. Data types supported: F16/F32 + * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32 * @param[in] max Max values tensor. Data types supported: same as @p input * @param[in] output Destination tensor. Data types supported: same as @p input * @param[in] sum Sum of 1D logits tensor. Data types supported: same as @p input @@ -205,7 +122,7 @@ public: * * @param[in] input Source tensor. Data types supported: S32/F16/F32. If this kernel is used for log softmax, only F32/F16 is supported. * @param[in] sum Sum tensor. Dimensions should be dim(input)-1. Data types supported: same as @p input - * @param[out] output Destination tensor. Data types supported: QASYMM8 for S32 @p input, or same as @p input + * @param[out] output Destination tensor. Data types supported: QASYMM8/QASYMM8_SIGNED for S32 @p input, or same as @p input * @param[in] info Contains information consumed by kernels for softmax described in @ref SoftmaxKernelInfo. */ void configure(const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, const SoftmaxKernelInfo &info); @@ -214,7 +131,7 @@ public: * @param[in] compile_context The compile context to be used. * @param[in] input Source tensor. Data types supported: S32/F16/F32. If this kernel is used for log softmax, only F32/F16 is supported. * @param[in] sum Sum tensor. Dimensions should be dim(input)-1. Data types supported: same as @p input - * @param[out] output Destination tensor. Data types supported: QASYMM8 for S32 @p input, or same as @p input + * @param[out] output Destination tensor. Data types supported: QASYMM8/QASYMM8_SIGNED for S32 @p input, or same as @p input * @param[in] info Contains information consumed by kernels for softmax described in @ref SoftmaxKernelInfo. */ void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, const SoftmaxKernelInfo &info); diff --git a/arm_compute/core/CL/kernels/CLUpsampleLayerKernel.h b/arm_compute/core/CL/kernels/CLUpsampleLayerKernel.h index d8e1ae113d..b523b97233 100644 --- a/arm_compute/core/CL/kernels/CLUpsampleLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLUpsampleLayerKernel.h @@ -49,7 +49,7 @@ public: /** Initialise the kernel's input and output. * - * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Destination tensor. Data types supported: same as @p input. * @param[in] info Contains stride information described in @ref Size2D. * @param[in] upsampling_policy Defines the policy to fill the intermediate pixels. @@ -58,7 +58,7 @@ public: /** Initialise the kernel's input and output. * * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. + * @param[in] input Source tensor. Data types supported: All. * @param[out] output Destination tensor. Data types supported: same as @p input. * @param[in] info Contains stride information described in @ref Size2D. * @param[in] upsampling_policy Defines the policy to fill the intermediate pixels. @@ -66,7 +66,7 @@ public: void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, const Size2D &info, const InterpolationPolicy upsampling_policy); /** Static function to check if given info will lead to a valid configuration of @ref CLUpsampleLayerKernel * - * @param[in] input Source tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. + * @param[in] input Source tensor info. Data types supported: All. * @param[in] output Destination tensor info. Data types supported: same as @p input. * @param[in] info Contains stride information described in @ref Size2D. * @param[in] upsampling_policy Defines the policy to fill the intermediate pixels. |