From ceaa0bfe219631b5a4e638613f90f9fa47a3defe Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Tue, 16 Feb 2021 15:15:19 +0000 Subject: Remove OpenGL ES support Remove the following: - Relevant backend kernels - Relevant backend functions - Relevant backend validation tests - Relevant backend specific examples - Remove backend support from Graph API - Remove backend support from build system Update documentation Resolves: COMPMID-4149 Change-Id: Id0621d6ee35169754de458103907aaba4ef770c0 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5097 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Georgios Pinitas --- .../GLES_COMPUTE/functions/GCAbsoluteDifference.h | 55 ------- .../GLES_COMPUTE/functions/GCActivationLayer.h | 70 --------- .../GLES_COMPUTE/functions/GCArithmeticAddition.h | 67 --------- .../functions/GCBatchNormalizationLayer.h | 71 --------- .../GLES_COMPUTE/functions/GCConcatenateLayer.h | 71 --------- .../GLES_COMPUTE/functions/GCConvolutionLayer.h | 161 --------------------- .../functions/GCDepthwiseConvolutionLayer.h | 78 ---------- .../functions/GCDirectConvolutionLayer.h | 83 ----------- .../GLES_COMPUTE/functions/GCDropoutLayer.h | 66 --------- .../runtime/GLES_COMPUTE/functions/GCFillBorder.h | 56 ------- .../GLES_COMPUTE/functions/GCFullyConnectedLayer.h | 116 --------------- .../runtime/GLES_COMPUTE/functions/GCGEMM.h | 116 --------------- .../GLES_COMPUTE/functions/GCGEMMInterleave4x4.h | 52 ------- .../GLES_COMPUTE/functions/GCGEMMTranspose1xW.h | 49 ------- .../GLES_COMPUTE/functions/GCNormalizationLayer.h | 76 ---------- .../functions/GCNormalizePlanarYUVLayer.h | 78 ---------- .../functions/GCPixelWiseMultiplication.h | 53 ------- .../GLES_COMPUTE/functions/GCPoolingLayer.h | 79 ---------- .../runtime/GLES_COMPUTE/functions/GCScale.h | 54 ------- .../GLES_COMPUTE/functions/GCSoftmaxLayer.h | 79 ---------- .../runtime/GLES_COMPUTE/functions/GCTensorShift.h | 54 ------- .../runtime/GLES_COMPUTE/functions/GCTranspose.h | 52 ------- 22 files changed, 1636 deletions(-) delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h delete mode 100644 arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h (limited to 'arm_compute/runtime/GLES_COMPUTE/functions') diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h deleted file mode 100644 index bbba8acd7e..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCAbsoluteDifference.h +++ /dev/null @@ -1,55 +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_GCABSOLUTEDIFFERENCE_H -#define ARM_COMPUTE_GCABSOLUTEDIFFERENCE_H - -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -class ITensor; - -/** Basic function to run @ref GCAbsoluteDifferenceKernel - * - * @note The tensor data types for the inputs must be U8. - * @note The function calculates the absolute difference also when the 2 inputs have different tensor data types. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCAbsoluteDifference : public IGCSimpleFunction -{ -public: - /** Initialize the function - * - * @param[in] input1 First input tensor. Data types supported: U8 - * @param[in] input2 Second input tensor. Data types supported: U8 - * @param[out] output Output tensor. Data types supported: U8 - */ - void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output); -}; -} - -#endif /* ARM_COMPUTE_GCABSOLUTEDIFFERENCE_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h deleted file mode 100644 index b09afbb81d..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h +++ /dev/null @@ -1,70 +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_GCACTIVATIONLAYER_H -#define ARM_COMPUTE_GCACTIVATIONLAYER_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -// Forward declarations -class IGCTensor; - -/** Basic function to run @ref GCActivationLayerKernel - * - * @note The function simulates an activation layer with the specified activation function. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCActivationLayer : public IGCSimpleFunction -{ -public: - /** Constructor - * - * @param[in, out] ctx Runtime context to be used by the function - */ - explicit GCActivationLayer(GCRuntimeContext *ctx = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCActivationLayer(const GCActivationLayer &) = delete; - /** Default move constructor */ - GCActivationLayer(GCActivationLayer &&) = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCActivationLayer &operator=(const GCActivationLayer &) = delete; - /** Default move assignment operator */ - GCActivationLayer &operator=(GCActivationLayer &&) = default; - /** Set the input and output tensor. - * - * @note If the output tensor is a nullptr, the activation function will be performed in-place - * - * @param[in, out] input Source tensor. In case of @p output tensor = nullptr, this tensor will store the result - * of the activation function. Data types supported: F16/F32. - * @param[out] output Destination tensor. Data type supported: same as @p input - * @param[in] act_info Activation layer parameters. - */ - void configure(IGCTensor *input, IGCTensor *output, ActivationLayerInfo act_info); -}; -} // namespace arm_compute -#endif /* ARM_COMPUTE_GCACTIVATIONLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h deleted file mode 100644 index 9a7527dcd5..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-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_GCARITHMETICADDITION_H -#define ARM_COMPUTE_GCARITHMETICADDITION_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to run @ref GCArithmeticAdditionKernel - * - * @note The tensor data type for the inputs must be F16. - * @note The function performs an arithmetic addition between two tensors. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCArithmeticAddition : public IGCSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output and convertion policy. - * - * @param[in] input1 First tensor input. Data types supported: F16. - * @param[in] input2 Second tensor input. Data types supported: F16. - * @param[out] output Output tensor. Data types supported: F16. - * @param[in] policy Policy to use to handle overflow. - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported. - */ - void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, ConvertPolicy policy, const ActivationLayerInfo &act_info = ActivationLayerInfo()); - /** Static function to check if given info will lead to a valid configuration of @ref GCArithmeticAddition - * - * @param[in] input1 First tensor input info. Data types supported: F16. - * @param[in] input2 Second tensor input info. Data types supported: F16. - * @param[in] output Output tensor info. Data types supported: F16. - * @param[in] policy Policy to use to handle overflow. - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported. - * - * @return a status - */ - static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info = ActivationLayerInfo()); -}; -} -#endif /* ARM_COMPUTE_GCARITHMETICADDITION_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h deleted file mode 100644 index 75b4cdc628..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h +++ /dev/null @@ -1,71 +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_GCBATCHNORMALIZATIONLAYER_H -#define ARM_COMPUTE_GCBATCHNORMALIZATIONLAYER_H - -#include "arm_compute/runtime/IFunction.h" - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.h" -#include "arm_compute/core/Types.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to run @ref GCBatchNormalizationLayerKernel and simulate a batch normalization layer. - * - * Batch normalization is calculated by: - * @f[ out_i = \gamma * (\frac{in_i - \mu_{B}}{\sqrt{\sigma^2_{B} + \epsilon}}) + \beta \equiv BN_{\gamma,\beta}(in_i) @f] - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCBatchNormalizationLayer : public IFunction -{ -public: - /** Default constructor */ - GCBatchNormalizationLayer(); - /** Set the input and output tensors. - * - * @param[in] input Source tensor. 3 lower dimensions represent a single input with dimensions [width, height, FM]. - * The rest are optional and used for representing batches. Data types supported: F16/F32. - * @param[out] output Destination tensor. Output will have the same number of dimensions as input. Data type supported: same as @p input - * @param[in] mean Mean values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input - * @param[in] var Variance values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input - * @param[in] beta Beta values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input - * @param[in] gamma Gamma values tensor. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input - * @param[in] epsilon Small value to avoid division with zero. - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU supported. - */ - void configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *var, const IGCTensor *beta, const IGCTensor *gamma, float epsilon, - ActivationLayerInfo act_info = ActivationLayerInfo()); - - // Inherited methods overridden: - void run() override; - -private: - GCBatchNormalizationLayerKernel _norm_kernel; /**< BatchNormalization layer kernel to run */ -}; -} -#endif /* ARM_COMPUTE_GCBATCHNORMALIZATIONLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h deleted file mode 100644 index fe24c07f63..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2019-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_GCDEPTHCONCATENATELAYER_H -#define ARM_COMPUTE_GCDEPTHCONCATENATELAYER_H - -#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthConcatenateLayerKernel.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/IFunction.h" - -#include -#include - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to execute concatenate tensors along a given axis. This function calls the following kernels: - * - * @note only axis z is supported - * -# @ref GCDepthConcatenateLayerKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCConcatenateLayer : public IFunction -{ -public: - /** Default constructor */ - GCConcatenateLayer(); - /** Initialise the kernel's inputs vector and output. - * - * @note Input and output tensor dimensions preconditions defer depending on the concatenation axis. - * - * @param[in,out] inputs_vector The vectors containing all the tensors to concatenate. Data types supported: F16/F32. - * @param[out] output Output tensor. Data types supported: Same as @p input. - * @param[in] axis Concatenation axis. Supported underlying concatenation axis is 2. - */ - void configure(std::vector inputs_vector, IGCTensor *output, size_t axis); - - // Inherited methods overridden: - void run() override; - -private: - std::vector> _concat_kernels; - unsigned int _num_inputs; - unsigned int _axis; -}; -} // namespace arm_compute -#endif /* ARM_COMPUTE_GCDEPTHCONCATENATELAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h deleted file mode 100644 index 3cff9688eb..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h +++ /dev/null @@ -1,161 +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_GCCONVOLUTIONLAYER_H -#define ARM_COMPUTE_GCCONVOLUTIONLAYER_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCCol2ImKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCWeightsReshapeKernel.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include - -namespace arm_compute -{ -class IGCTensor; - -/** Function to reshape and transpose the weights. This function calls the following kernels: - * -# @ref GCWeightsReshapeKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCConvolutionLayerReshapeWeights : public IFunction -{ -public: - /** Constructor */ - GCConvolutionLayerReshapeWeights(); - /** Set the input and output tensors. - * - * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. - * Data type supported: F16/F32. - * @param[in] biases Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p weights. - * @param[out] output Destination tensor. Data types supported: Same as @p weights. - */ - void configure(const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output); - // Inherited methods overridden: - void run() override; - -private: - GCWeightsReshapeKernel _weights_reshape_kernel; -}; - -/** Basic function to compute the convolution layer. This function calls the following GLES kernels: - * - * -# @ref GCWeightsReshapeKernel (executed only once for each configuration) - * -# @ref GCGEMMTranspose1xWKernel (executed only once for each configuration) - * -# @ref GCIm2ColKernel - * -# @ref GCGEMMInterleave4x4Kernel - * -# @ref GCCol2ImKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCConvolutionLayer : public IFunction -{ -public: - /** Default constructor */ - GCConvolutionLayer(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCConvolutionLayer(const GCConvolutionLayer &) = delete; - /** Default move constructor */ - GCConvolutionLayer(GCConvolutionLayer &&) = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCConvolutionLayer &operator=(const GCConvolutionLayer &) = delete; - /** Default move assignment operator */ - GCConvolutionLayer &operator=(GCConvolutionLayer &&) = default; - /** Set the input and output tensors. - * - * @param[in] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM], - * while every optional dimension from 4 and above represent a batch of inputs. - * Data types supported: F16/F32. - * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: Same as @p input. - * @param[in] biases Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. - * Data type supported: Should match @p input data type, except for input of QASYMM8 type where biases should be of S32 type. - * @param[out] output Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. - * Data types supported: Same as @p input. - * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo. - * @param[in] weights_info Specifies if the weights tensor has been reshaped with GCWeightsReshapeKernel. If this is not part of the fully connected layer the weights - * tensor has also been transposed with GCGEMMTranspose1xWKernel. Data type supported: Same as @p input. - * @param[in] dilation (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. - * @param[in] num_groups (Optional) Number of groups when performing a grouped convolution. num_groups != 1 is not supported - */ - void configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, - const WeightsInfo &weights_info = WeightsInfo(), const Size2D &dilation = Size2D(1U, 1U), const ActivationLayerInfo &act_info = ActivationLayerInfo(), unsigned int num_groups = 1); - - // Inherited methods overridden: - void run() override; - void prepare() override; - -private: - /** Configures the appropriate matrix multiply routine - * - * @param input Input tensor. Data types supported: F16/F32. - * @param weights Weights tensor. Data type supported: Same as @p input. - * @param output Output tensor. Data types supported: Same as @p input, - */ - void configure_mm(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output); - /** Static function to check if given info will lead to a valid configuration of @ref GCGEMMConvolutionLayer matrix multiply routines - * - * @param[in] input Input tensor. Data types supported: QASYMM8/F16/F32. - * @param[in] weights Weights tensor. Data type supported: Same as @p input. - * @param[in] output Output tensor. Data types supported: Same as @p input, - * except for input of QASYMM8 type where output should be of S32 type. - * - * @return a status - */ - static Status validate_mm(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *output); - -private: - MemoryGroup _memory_group; - GCConvolutionLayerReshapeWeights _reshape_weights; - GCIm2ColKernel _input_im2col_kernel; - GCGEMM _mm_gemm; - GCCol2ImKernel _output_col2im_kernel; - GCFillBorderKernel _fill_border; - GCActivationLayer _activationlayer_function; - - const IGCTensor *_original_weights; - - GCTensor _input_im2col_reshaped; - GCTensor _input_interleaved_reshaped; - GCTensor _weights_reshaped; - GCTensor _weights_transposed; - GCTensor _gemm_output; - GCTensor _tmp_output; - - bool _is_activationlayer_enabled; - bool _is_prepared; -}; -} - -#endif /* ARM_COMPUTE_GCCONVOLUTIONLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h deleted file mode 100644 index 82fe368d7d..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.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_GCDEPTHWISECONVOLUTION_H -#define ARM_COMPUTE_GCDEPTHWISECONVOLUTION_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h" -#include "arm_compute/runtime/IFunction.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to execute a depthwise convolution for kernel size 3x3xC. This function calls the following OpenGLES kernels: - * - * -# @ref GCDepthwiseConvolutionLayer3x3Kernel - * -# @ref GCFillBorderKernel (if pad_x or pad_y > 0) - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCDepthwiseConvolutionLayer3x3 : public IFunction -{ -public: - /** Default constructor */ - GCDepthwiseConvolutionLayer3x3(); - /** Initialize the function's source, destination, conv and border_size. - * - * @param[in, out] input Source tensor. Data type supported: F16. (Written to only for border filling). - * @param[in] weights Weights tensor. A 3D tensor with shape [3, 3, IFM]. Data type supported: Same as @p input. - * @param[in] biases Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed. - * Data type supported: Same as @p input. - * @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. - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. - * @param[in] dilation (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). Currently supports (1,1) only. - */ - void configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, - unsigned int depth_multiplier = 1, const ActivationLayerInfo &act_info = ActivationLayerInfo(), const Size2D &dilation = Size2D(1U, 1U)); - - // Inherited methods overridden: - void run() override final; - -private: - std::unique_ptr _kernel; - GCFillBorderKernel _border_handler; - GCTensorShiftKernel _shift_handler; - GCActivationLayer _activationlayer_function; - - bool _is_activationlayer_enabled; -}; -} -#endif /*ARM_COMPUTE_GCDEPTHWISECONVOLUTION_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h deleted file mode 100644 index f834802db6..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h +++ /dev/null @@ -1,83 +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_GCDIRECTCONVOLUTIONLAYER_H -#define ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYER_H - -#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h" -#include "arm_compute/runtime/IFunction.h" - -#include - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to execute direct convolution function. This function calls the following kernels: - * - * -# @ref GCDirectConvolutionLayerKernel - * -# @ref GCFillBorderKernel - * -# @ref GCTensorShiftKernel - * - * @note Supported kernel size: 1x1, 3x3, and 5x5 - * @note This OpenGL ES implementation works with stride_x = 1 and 2 - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCDirectConvolutionLayer : public IFunction -{ -public: - /** Default constructor */ - GCDirectConvolutionLayer(); - /** Set the input and output tensors. - * - * @param[in,out] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM], - * while every optional dimension from 4 and above represent a batch of inputs. - * Data types supported: F16/F32. - * input will be written to only if it is currently left aligned. - * @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as @p input. - * @param[in] biases Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported:Same as @p input. - * @param[out] output Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. - * Data types supported: Same as @p input. - * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo. - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. - */ - void configure(IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, - const ActivationLayerInfo &act_info = ActivationLayerInfo()); - - // Inherited methods overridden: - void run() override final; - -private: - std::unique_ptr _kernel; - GCFillBorderKernel _border_handler; - GCTensorShiftKernel _shift_handler; -}; -} -#endif /* ARM_COMPUTE_GCDIRECTCONVOLUTIONLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h deleted file mode 100644 index 4d551f2692..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h +++ /dev/null @@ -1,66 +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_GCDROPOUTLAYER_H -#define ARM_COMPUTE_GCDROPOUTLAYER_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCDropoutLayerKernel.h" -#include "arm_compute/runtime/IFunction.h" - -namespace arm_compute -{ -class IGCTensor; -/** Basic function to do dropout op. This function calls the following kernels: - * - * -# @ref GCDropoutLayerKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCDropoutLayer : public IFunction -{ -public: - /** Constructor */ - GCDropoutLayer(); - - /** Set the input and output tensors. - * - * @param[in] input Source tensor. Data type supported: F16/F32. - * @param[out] mask Destination tensor. Data type supported: Same as @p input. - * @param[out] output Destination tensor. Data type supported: Same as @p input. - * @param[in] ratio Dropout ratio - * @param[in] forward Forward or backward propagation - * - */ - void configure(const IGCTensor *input, IGCTensor *mask, IGCTensor *output, float ratio, bool forward); - - //Inherited methods override - void run() override; - -private: - GCDropoutLayerKernel _dropout_kernel; -}; -} - -#endif /* ARM_COMPUTE_GCDROPOUTLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h deleted file mode 100644 index 1635db51e7..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCFillBorder.h +++ /dev/null @@ -1,56 +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_GCFILLBORDER_H -#define ARM_COMPUTE_GCFILLBORDER_H - -#include "arm_compute/core/PixelValue.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -class ITensor; - -/** Basic function to run @ref GCFillBorderKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCFillBorder : public IGCSimpleFunction -{ -public: - /** Initialize the function - * - * @param[in,out] tensor Source tensor. Data types supported: F16/F32 - * @param[in] border_width The border width - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(IGCTensor *tensor, unsigned int border_width, BorderMode border_mode, - const PixelValue &constant_border_value = PixelValue()); -}; -} - -#endif /*ARM_COMPUTE_FILLBORDER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h deleted file mode 100644 index f839a7db39..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h +++ /dev/null @@ -1,116 +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_GCFULLYCONNECTEDLAYER_H -#define ARM_COMPUTE_GCFULLYCONNECTEDLAYER_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAccumulateBiasesKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCIm2ColKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCTransposeKernel.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" -#include "arm_compute/runtime/IWeightsManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -namespace arm_compute -{ -/** Basic function to reshape the weights of Fully Connected layer with OpenGL ES. This function calls the following kernels: - * - * -# @ref GCTransposeKernel - * - * @note The fully connected layer accepts "weights" tensors only with 2 dimensions. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCFullyConnectedLayerReshapeWeights : public IGCSimpleFunction -{ -public: - /** Set the input and output tensors. - * - * @param[in] input Weights tensor. The weights must be 2 dimensional. Data types supported: F16/F32. - * @param[out] output Destination tensor which stores the transposed input tensor. Data type supported: Same as @p input. - */ - void configure(const IGCTensor *input, IGCTensor *output); -}; - -/** Basic function to compute a Fully Connected layer on OpenGL ES. This function calls the following OpenGL ES kernels: - * - * -# @ref GCIm2ColKernel (called when the input comes from a convolutional layer) - * -# @ref GCFullyConnectedLayerReshapeWeights (if @p are_weights_reshaped is set to false and transpose_weights is set to true ) (called once) - * -# @ref GCGEMMMatrixMultiplyKernel - * -# @ref GCGEMMMatrixAccumulateBiasesKernel (if @p biases is not equal to nullptr) - * - * @note The fully connected layer accepts "weights" tensors only with 2 dimensions. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCFullyConnectedLayer : public IFunction -{ -public: - /** Constructor */ - GCFullyConnectedLayer(std::shared_ptr memory_manager = nullptr, IWeightsManager *weights_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCFullyConnectedLayer(const GCFullyConnectedLayer &) = delete; - /** Default move constructor */ - GCFullyConnectedLayer(GCFullyConnectedLayer &&) = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCFullyConnectedLayer &operator=(const GCFullyConnectedLayer &) = delete; - /** Default move assignment operator */ - GCFullyConnectedLayer &operator=(GCFullyConnectedLayer &&) = default; - /** Set the input and output tensors. - * - * @param[in] input Source tensor. Data type supported: F16/F32. - * @param[in] weights Weights tensor. The weights must be 2 dimensional. Data type supported: Same as @p input - * @param[in] biases Bias tensor. It can be nullptr. Data type supported:Same as @p input. - * @param[out] output Destination tensor. Data type supported: Same as @p input. - * @param[in] fc_info (Optional) Fully connected layer additional info - */ - void configure(const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, - FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo()); - - //Inherited methods override - void run() override; - void prepare() override; - -private: - void configure_fc_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output); - void configure_conv_fc(const IGCTensor *input, const IGCTensor *weights, IGCTensor *output); - - MemoryGroup _memory_group; - IWeightsManager *_weights_manager; - GCIm2ColKernel _im2col_kernel; - GCFullyConnectedLayerReshapeWeights _reshape_weights_kernel; - GCGEMMMatrixMultiplyKernel _mm_kernel; - GCGEMMMatrixAccumulateBiasesKernel _accumulate_biases_kernel; - GCTensor _im2col_output; - GCTensor _reshape_weights_output; - const IGCTensor *_original_weights; - bool _are_weights_reshaped; - bool _is_fc_after_conv; - bool _accumulate_biases; -}; -} -#endif /* ARM_COMPUTE_GCFULLYCONNECTEDLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h deleted file mode 100644 index 653da4b981..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h +++ /dev/null @@ -1,116 +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_GCGEMM_H -#define ARM_COMPUTE_GCGEMM_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixAdditionKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/MemoryGroup.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to execute GEMM on OpenGLES Compute. This function calls the following kernels: - * - * -# @ref GCGEMMInterleave4x4Kernel (if the output tensor is a matrix) - * -# @ref GCGEMMTranspose1xWKernel (if the output tensor is a matrix) - * -# @ref GCGEMMMatrixMultiplyKernel - * -# @ref GCGEMMMatrixAdditionKernel (if c != nullptr and beta != 0.0) - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCGEMM : public IFunction -{ -public: - /** Default constructor. */ - GCGEMM(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCGEMM(const GCGEMM &) = delete; - /** Default move constructor */ - GCGEMM(GCGEMM &&) = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - GCGEMM &operator=(const GCGEMM &) = delete; - /** Default move assignment operator */ - GCGEMM &operator=(GCGEMM &&) = default; - /** Initialise the kernel's inputs and output - * - * @note GEMM: General Matrix Multiply - [alpha * A * B + beta * C]. - * - * @note All tensors must have the same data type. - * - * @note Whilst the first input tensor can be a vector, the second input tensor must be at least a matrix - * - * @param[in] a First input tensor (Matrix or Vector A). Data types supported: F32 - * @param[in] b Second input tensor (Matrix B). Data type supported: same as @p a. - * @param[in] c Third input tensor (Matrix C). It can be a nullptr if just the multiplication between @p a and @p b is needed. Data type supported: same as @p a. - * @param[out] output Output tensor. Data type supported: same as @p a - * @param[in] alpha Weight of the matrix product - * @param[in] beta Weight of matrix C - * @param[in] gemm_info (Optional) Specifies if the matrix A and/or matrix B have been reshaped and - * if the reshape of matrix B should happen only for the first run - */ - void configure(const IGCTensor *a, const IGCTensor *b, const IGCTensor *c, IGCTensor *output, float alpha, float beta, const GEMMInfo &gemm_info = GEMMInfo()); - /** Static function to check if given info will lead to a valid configuration of @ref GCGEMM. - * - * @param[in] a First input tensor (Matrix or Vector A). Data types supported: F16/F32 - * @param[in] b Second input tensor (Matrix B). Data type supported: same as @p a. - * @param[in] c Third input tensor (Matrix C). It can be a nullptr if just the multiplication between @p a and @p b is needed. Data type supported: same as @p a. - * @param[out] output Output tensor. Data type supported: same as @p a - * @param[in] alpha Weight of the matrix product - * @param[in] beta Weight of matrix C - * @param[in] gemm_info (Optional) Specifies if the matrix A and/or matrix B have been reshaped and - * if the reshape of matrix B should happen only for the first run - * - * @return a status - */ - static Status validate(const ITensorInfo *a, const ITensorInfo *b, const IGCTensor *c, const ITensorInfo *output, const float alpha, const float beta, const GEMMInfo &gemm_info = GEMMInfo()); - - // Inherited methods overridden: - void run() override; - void prepare() override; - -private: - MemoryGroup _memory_group; - GCGEMMInterleave4x4Kernel _interleave_kernel; - GCGEMMTranspose1xWKernel _transpose_kernel; - GCGEMMMatrixMultiplyKernel _mm_kernel; - GCGEMMMatrixAdditionKernel _ma_kernel; - GCTensor _tmp_a; - GCTensor _tmp_b; - const IGCTensor *_original_b; - bool _is_interleaved_transposed; - bool _run_addition; - bool _reshape_b_only_on_first_run; - bool _is_prepared; -}; -} - -#endif /* ARM_COMPUTE_GCGEMM_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h deleted file mode 100644 index 964c368316..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMInterleave4x4.h +++ /dev/null @@ -1,52 +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_GCGEMMINTERLEAVE4X4_H -#define ARM_COMPUTE_GCGEMMINTERLEAVE4X4_H - -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -class ITensor; - -/** Basic function to execute GCGEMMInterleave4x4Kernel. This function calls the following OpenGL ES kernel: - * - * -# @ref GCGEMMInterleave4x4Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCGEMMInterleave4x4 : public IGCSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output - * - * @param[in] input First input tensor. Data types supported: F32, F16 - * @param[out] output Output tensor. Data type supported: same as @p input - */ - void configure(const IGCTensor *input, IGCTensor *output); -}; -} - -#endif /* ARM_COMPUTE_GCGEMMINTERLEAVE4X4_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h deleted file mode 100644 index 107590cf76..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCGEMMTranspose1xW.h +++ /dev/null @@ -1,49 +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_GCGEMMTRANSPOSE1XW_H -#define ARM_COMPUTE_GCGEMMTRANSPOSE1XW_H - -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -/** Basic function to execute GCGEMMTranspose1xWKernel. This function calls the following OpenGLES kernels: - * - * -# @ref GCGEMMTranspose1xWKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCGEMMTranspose1xW : public IGCSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output - * - * @param[in] input First input tensor. Data type supported: F32 - * @param[out] output Output tensor. Data type supported: same as @p input - */ - void configure(const IGCTensor *input, IGCTensor *output); -}; -} -#endif /*ARM_COMPUTE_GCGEMMTRANSPOSE1XW_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h deleted file mode 100644 index f8ee39c362..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h +++ /dev/null @@ -1,76 +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_GCNORMALIZATIONLAYER_H -#define ARM_COMPUTE_GCNORMALIZATIONLAYER_H - -#include "arm_compute/runtime/IFunction.h" - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizationLayerKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCPixelWiseMultiplicationKernel.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include "arm_compute/core/Types.h" - -namespace arm_compute -{ -// Forward declarations -class IGCTensor; - -/** Basic function to compute a normalization layer. This function calls the following OpenGL ES kernels: - * - * -# @ref GCPixelWiseMultiplicationKernel - * -# @ref GCFillBorderKernel - * -# @ref GCNormalizationLayerKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCNormalizationLayer : public IFunction -{ -public: - /** Default constructor */ - GCNormalizationLayer(std::shared_ptr memory_manager = nullptr); - /** Set the input and output tensors. - * - * @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], - * and an optional 4th dimension for batch of inputs. Data types supported: F32. Number of channels must be 1. - * @param[out] output Destination tensor. Dimensions, data type and number of channels must match the input ones. - * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters. - */ - void configure(const IGCTensor *input, IGCTensor *output, const NormalizationLayerInfo &norm_info); - - // Inherited methods overridden: - void run() override; - -private: - MemoryGroup _memory_group; - GCTensor _squared_input; /**< The intermediate buffer which stores results of squaring input*/ - GCNormalizationLayerKernel _norm_kernel; /**< Normalization layer kernel to run */ - GCPixelWiseMultiplicationKernel _multiply_kernel; /**< Pixel multiplication kernel to run */ - GCFillBorderKernel _border_handler; /**< Kernel to handle borders */ -}; -} // namespace arm_compute -#endif /* ARM_COMPUTE_GCNORMALIZATIONLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h deleted file mode 100644 index e097cb9291..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.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_GCNORMALIZEPLANARYUVLAYER_H -#define ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYER_H - -#include "arm_compute/runtime/IFunction.h" - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCNormalizePlanarYUVLayerKernel.h" -#include "arm_compute/core/Types.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to run @ref GCNormalizePlanarYUVLayerKernel - * - * @note The function simulates a NormalizePlanarYUV layer. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCNormalizePlanarYUVLayer : public IFunction -{ -public: - /** Default constructor */ - GCNormalizePlanarYUVLayer(); - /** Set the input and output tensors. - * - * @param[in] input Source tensor. 3 lower dimensions represent a single input with dimensions [width, height, channels]. - * Data types supported: F16. - * @param[out] output Destination tensor. Data type supported: same as @p input - * @param[in] mean Mean values tensor. 1 dimension with size equal to the number of input channels. Data types supported: same as @p input - * @param[in] std Standard deviation values tensor. 1 dimension with size equal to the number of input channels. - * Data types supported: same as @p input - */ - void configure(const IGCTensor *input, IGCTensor *output, const IGCTensor *mean, const IGCTensor *std); - /** Static function to check if given info will lead to a valid configuration of @ref CLNormalizePlanarYUVLayer - * - * @param[in] input Source tensor info. 3 lower dimensions represent a single input with dimensions [width, height, channels]. - * Data types supported: F16/F32. - * @param[out] output Destination tensor info. Data type supported: same as @p input - * @param[in] mean Mean values tensor info. 1 dimension with size equal to the number of input channels. Data types supported: same as @p input - * @param[in] std Standard deviation values tensor info. 1 dimension with size equal to the number of input channels. - * Data types supported: same as @p input - * - * @return a status - */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std); - - // Inherited methods overridden: - void run() override; - -private: - GCNormalizePlanarYUVLayerKernel _norm_kernel; /**< NormalizePlanarYUV layer kernel to run */ -}; -} -#endif /* ARM_COMPUTE_GCNORMALIZEPLANARYUVLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h deleted file mode 100644 index e09ce374ff..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCPixelWiseMultiplication.h +++ /dev/null @@ -1,53 +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_GCPIXELWISEMULTIPLICATION_H -#define ARM_COMPUTE_GCPIXELWISEMULTIPLICATION_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to run @ref GCPixelWiseMultiplicationKernel. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCPixelWiseMultiplication : public IGCSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output and convertion policy. - * - * @param[in] input1 First tensor input. Data types supported: F32. - * @param[in] input2 Second tensor input. Data types supported: Same as @p input1. - * @param[out] output Output tensor. Data types supported: Same as @p input1. - * @param[in] scale Scale to apply after multiplication. Must be a positive value. - * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported. - */ - void configure(const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, float scale, const ActivationLayerInfo &act_info = ActivationLayerInfo()); -}; -} -#endif /*ARM_COMPUTE_GCPIXELWISEMULTIPLICATION_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h deleted file mode 100644 index dcb7e81b9b..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h +++ /dev/null @@ -1,79 +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_GCPOOLINGLAYER_H -#define ARM_COMPUTE_GCPOOLINGLAYER_H - -#include "arm_compute/core/GLES_COMPUTE/IGCKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCFillBorderKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.h" -#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h" -#include "arm_compute/runtime/IFunction.h" - -#include "arm_compute/core/Error.h" -#include "arm_compute/core/Types.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to simulate a pooling layer with the specified pooling operation. This function calls the following OpenGL ES kernels: - * - * -# @ref GCFillBorderKernel (executed if padding size is different from zero) - * -# @ref GCPoolingLayerKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCPoolingLayer : public IFunction -{ -public: - GCPoolingLayer(); - /** Set the input and output tensors. - * - * @param[in,out] input Source tensor. (Written to only when padding != 0) Data types supported: F16/F32. - * @param[out] output Destination tensor. Data types supported: Same as @p input. - * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo. - * @param[out] indices (optional) The indices of the maximal values. Data type supported: U32. - */ - void configure(IGCTensor *input, IGCTensor *output, const PoolingLayerInfo &pool_info, IGCTensor *indices = nullptr); - /** Static function to check if given info will lead to a valid configuration of @ref GCPoolingLayer - * - * @param[in] input Source tensor info. Data types supported: F16/F32. - * @param[in] output Destination tensor info. Data types supported: Same as @p input. - * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo. - * @param[in] indices (optional) The indices of the maximal values. Data type supported: U32. - * - * @return a status - */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices = nullptr); - - void run() override final; - -private: - std::unique_ptr _kernel; - GCFillBorderKernel _border_handler; - GCTensorShiftKernel _shift_handler; -}; -} // namespace arm_compute -#endif /* ARM_COMPUTE_GCPOOLINGLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h deleted file mode 100644 index 8e44d3bc70..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2016-2021 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_GCSCALE_H -#define ARM_COMPUTE_GCSCALE_H - -#include "arm_compute/core/KernelDescriptors.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -#include - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to run @ref GCScaleKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCScale : public IGCSimpleFunction -{ -public: - /** Initialize the function's source, destination, interpolation type and border_mode. - * - * @param[in,out] input Source tensor. Data types supported: F16. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types 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. - * @param[in] info @ref ScaleKernelInfo descriptor to be used to configure - */ - void configure(IGCTensor *input, IGCTensor *output, const ScaleKernelInfo &info); -}; -} -#endif /*ARM_COMPUTE_GCSCALE_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h deleted file mode 100644 index 083b07c57c..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h +++ /dev/null @@ -1,79 +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_GCSOFTMAXLAYER_H -#define ARM_COMPUTE_GCSOFTMAXLAYER_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/MemoryGroup.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to compute a SoftmaxLayer. - * - * Softmax is calculated by : - * @f[ out = exp(x - max(x)) / sum(exp(x - max(x))) @f] - * - * This function runs the following kernels: - * -# @ref GCLogits1DMaxKernel - * -# @ref GCLogits1DShiftExpSumKernel - * -# @ref GCLogits1DNormKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCSoftmaxLayer : public IFunction -{ -public: - /** Constructor */ - GCSoftmaxLayer(std::shared_ptr memory_manager = nullptr); - /** Set the input and output tensors. - * - * @param[in] input Source tensor. Data types supported: F16/F32 - * @param[out] output Destination tensor. Data types supported: same as @p input - * @param[in] beta (Optional) A scaling factor for the exponent. Only beta = 1 is supported - * @param[in] axis (Optional) The dimension in which to apply the function. E.g. for input of shape 4x5x6 and - * axis=1, softmax will be applied to 4x6=24 vectors of size 5. Defaults to 0 - * - * @note The value of @p axis must be always 0 for GLES - */ - void configure(const IGCTensor *input, IGCTensor *output, float beta = 1.0f, int32_t axis = 0); - - // Inherited methods overridden: - void run() override; - -private: - MemoryGroup _memory_group; - GCLogits1DMaxKernel _max_kernel; - GCLogits1DShiftExpSumKernel _shift_exp_sum_kernel; - GCLogits1DNormKernel _norm_kernel; - GCTensor _max; - GCTensor _sum; - GCTensor _tmp; -}; -} // namespace arm_compute -#endif /* ARM_COMPUTE_GCSOFTMAXLAYER_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h deleted file mode 100644 index d25a322f4f..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCTensorShift.h +++ /dev/null @@ -1,54 +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_GCTENSORSHIFT_H -#define ARM_COMPUTE_GCTENSORSHIFT_H - -#include "arm_compute/core/GLES_COMPUTE/kernels/GCTensorShiftKernel.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -#include - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to execute shift function for tensor. This function applies to fix alignment issue on OpenGL ES: - * - * @note This alignment issue is introduced by limits of compute shader which requires 32/64/128bit alignment for data access on OpenGL ES - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCTensorShift : public IGCSimpleFunction -{ -public: - /** Initialise the kernel's input, output. - * - * @param[in,out] input Source tensor. Data types supported: F16/F32. - */ - void configure(IGCTensor *input); -}; -} -#endif /* ARM_COMPUTE_GCTENSORSHIFT_H */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h deleted file mode 100644 index 84e303aa25..0000000000 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h +++ /dev/null @@ -1,52 +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_GCTRANSPOSE_H -#define ARM_COMPUTE_GCTRANSPOSE_H - -#include "arm_compute/runtime/GLES_COMPUTE/IGCSimpleFunction.h" - -namespace arm_compute -{ -class IGCTensor; - -/** Basic function to transpose a matrix on OpenGL ES. This function calls the following OpenGL ES kernel: - * - * -# @ref GCTransposeKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class GCTranspose : public IGCSimpleFunction -{ -public: - /** Initialise the kernel's inputs and output - * - * @param[in] input Input tensor. Data types supported: F16/F32 - * @param[out] output Output tensor. Data type supported: Same as @p input - */ - void configure(const IGCTensor *input, IGCTensor *output); -}; -} - -#endif /* ARM_COMPUTE_GCTRANSPOSE_H */ -- cgit v1.2.1