From 0ae5de9124a0094e656244ad2f807c084966fc04 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Thu, 14 Mar 2019 10:32:11 +0000 Subject: COMPMID-1995: Prepare Graph to support different input/output quantization info - Added support for different input/output qinfo in ActivationLayer and DepthwiseConv - Added support for different input/output qinfo in ConcatenateLayer introducing ConcatDescriptor - Added reshape validate - Allow OutputLayer to return a specific connection index from the input - Not run Inplace and Depth mutator when input/output quantization info are different Change-Id: I03f5e416fc43ddd284e1501887202a3145f76d8a Signed-off-by: Isabella Gottardi Reviewed-on: https://review.mlplatform.org/c/852 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Georgios Pinitas --- arm_compute/graph/backends/ValidateHelpers.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'arm_compute/graph/backends/ValidateHelpers.h') diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h index 8942be2da8..dbf8f35121 100644 --- a/arm_compute/graph/backends/ValidateHelpers.h +++ b/arm_compute/graph/backends/ValidateHelpers.h @@ -203,6 +203,7 @@ Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node) return status; } + /** Validates a detection output layer node * * @tparam DetectionOutputLayer DetectionOutput layer type @@ -372,6 +373,29 @@ Status validate_reorg_layer(ReorgLayerNode &node) return ReorgLayer::validate(input, output, node.stride()); } +/** Validates a Reshape layer node + * + * @tparam ReshapeLayer Reshape layer type + * + * @param[in] node Node to validate + * + * @return Status + */ +template +Status validate_reshape_layer(ReshapeLayerNode &node) +{ + ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReshapeLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl); + ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 1); + ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1); + + // Extract input and output + arm_compute::ITensorInfo *input = detail::get_backing_tensor_info(node.input(0)); + arm_compute::ITensorInfo *output = detail::get_backing_tensor_info(node.output(0)); + + // Validate function + return ReshapeLayer::validate(input, output); +} + /** Validates a ROI Align layer node * * @tparam ROIAlignLayer ROIAlign layer type -- cgit v1.2.1