diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2021-02-16 15:15:19 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-02-23 18:21:55 +0000 |
commit | ceaa0bfe219631b5a4e638613f90f9fa47a3defe (patch) | |
tree | 3bb878645ae7509f7807197d320a02882ad84751 /src/graph/backends/GLES/GCNodeValidator.cpp | |
parent | c40562d4467e3a68b0dac5e865570c8f38d1487e (diff) | |
download | ComputeLibrary-ceaa0bfe219631b5a4e638613f90f9fa47a3defe.tar.gz |
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 <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5097
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/graph/backends/GLES/GCNodeValidator.cpp')
-rw-r--r-- | src/graph/backends/GLES/GCNodeValidator.cpp | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/src/graph/backends/GLES/GCNodeValidator.cpp b/src/graph/backends/GLES/GCNodeValidator.cpp deleted file mode 100644 index a83c1a3506..0000000000 --- a/src/graph/backends/GLES/GCNodeValidator.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2018-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. - */ -#include "arm_compute/graph/backends/GLES/GCNodeValidator.h" - -#include "arm_compute/graph/backends/ValidateHelpers.h" -#include "arm_compute/graph/nodes/Nodes.h" - -#include "arm_compute/runtime/GLES_COMPUTE/GCFunctions.h" -#include "support/Cast.h" - -using namespace arm_compute::utils::cast; - -namespace arm_compute -{ -namespace graph -{ -namespace backends -{ -namespace -{ -/** Validates a Depthwise Convolution layer node - * - * @param[in] node Node to validate - * - * @return Status - */ -Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node) -{ - ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating GCDepthwiseConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl); - ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 3); - ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1); - - // Extract IO and info - arm_compute::ITensorInfo *weights = detail::get_backing_tensor_info(node.input(1)); - ARM_COMPUTE_ERROR_ON(weights == nullptr); - - // TODO (geopin01) : Switch when validation is implemented - // Validate function - ARM_COMPUTE_RETURN_ERROR_ON_MSG(weights->tensor_shape().x() != 3 && weights->tensor_shape().y() != 3, "Unsupported depthwise convolution"); - - return Status{}; -} -/** Validates a Convolution layer node - * - * @param[in] node Node to validate - * - * @return Status - */ -Status validate_convolution_layer(ConvolutionLayerNode &node) -{ - ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl); - ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 3); - ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1); - - // Extract IO and info - arm_compute::ITensorInfo *weights = detail::get_backing_tensor_info(node.input(1)); - const PadStrideInfo conv_info = node.convolution_info(); - const ConvolutionMethod conv_algorithm = node.convolution_method(); - - // Validate function - ARM_COMPUTE_RETURN_ERROR_ON_MSG(node.num_groups() != 1, "Grouping is not supported by ConvolutionLayer!"); - if(conv_algorithm == ConvolutionMethod::Direct) - { - bool is_square = weights->tensor_shape().x() == weights->tensor_shape().y(); - bool is_direct = (weights->tensor_shape().x() == 1) || (weights->tensor_shape().x() == 3) || (weights->tensor_shape().x() == 5); - bool is_correct_stride = (conv_info.stride().first) <= 2 && (conv_info.stride().second <= 2); - ARM_COMPUTE_RETURN_ERROR_ON_MSG(!(is_square && is_direct && is_correct_stride), "Direct convolution is not supported for given configuration"); - } - - return Status{}; -} -} // namespace - -Status GCNodeValidator::validate(INode *node) -{ - if(node == nullptr) - { - return Status{}; - } - - NodeType type = node->type(); - switch(type) - { - case NodeType::BoundingBoxTransformLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : BoundingBoxTransformLayer"); - case NodeType::ChannelShuffleLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ChannelShuffleLayer"); - case NodeType::ConvolutionLayer: - return validate_convolution_layer(*polymorphic_downcast<ConvolutionLayerNode *>(node)); - case NodeType::DepthwiseConvolutionLayer: - return validate_depthwise_convolution_layer(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); - case NodeType::DequantizationLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : DequantizationLayer"); - case NodeType::DetectionOutputLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : DetectionOutputLayer"); - case NodeType::DetectionPostProcessLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : DetectionPostProcessLayer"); - case NodeType::FlattenLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : FlattenLayer"); - case NodeType::GenerateProposalsLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : GenerateProposalsLayer"); - case NodeType::NormalizePlanarYUVLayer: - return detail::validate_normalize_planar_yuv_layer<GCNormalizePlanarYUVLayer>(*polymorphic_downcast<NormalizePlanarYUVLayerNode *>(node)); - case NodeType::PadLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : PadLayer"); - case NodeType::PermuteLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : PermuteLayer"); - case NodeType::PriorBoxLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : PriorBoxLayer"); - case NodeType::QuantizationLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : QuantizationLayer"); - case NodeType::ReorgLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ReorgLayer"); - case NodeType::ReshapeLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ReshapeLayer"); - case NodeType::ROIAlignLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ROIAlignLayer"); - case NodeType::SliceLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : SliceLayer"); - default: - return Status{}; - } -} -} // namespace backends -} // namespace graph -} // namespace arm_compute |