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 --- src/graph/nodes/DepthwiseConvolutionLayerNode.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/graph/nodes/DepthwiseConvolutionLayerNode.cpp') diff --git a/src/graph/nodes/DepthwiseConvolutionLayerNode.cpp b/src/graph/nodes/DepthwiseConvolutionLayerNode.cpp index 75ca5f4e03..935902d3fd 100644 --- a/src/graph/nodes/DepthwiseConvolutionLayerNode.cpp +++ b/src/graph/nodes/DepthwiseConvolutionLayerNode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -32,8 +32,9 @@ namespace arm_compute { namespace graph { -DepthwiseConvolutionLayerNode::DepthwiseConvolutionLayerNode(PadStrideInfo info, int depth_multiplier, DepthwiseConvolutionMethod method) - : _info(std::move(info)), _depth_multiplier(depth_multiplier), _method(method), _fused_activation() +DepthwiseConvolutionLayerNode::DepthwiseConvolutionLayerNode(PadStrideInfo info, int depth_multiplier, DepthwiseConvolutionMethod method, + QuantizationInfo out_quant_info) + : _info(std::move(info)), _depth_multiplier(depth_multiplier), _method(method), _out_quant_info(out_quant_info), _fused_activation() { _input_edges.resize(3, EmptyEdgeID); _outputs.resize(1, NullTensorID); @@ -113,7 +114,13 @@ TensorDescriptor DepthwiseConvolutionLayerNode::configure_output(size_t idx) con ARM_COMPUTE_ERROR_ON(src == nullptr || weights == nullptr); - return compute_output_descriptor(src->desc(), weights->desc(), _info, _depth_multiplier); + TensorDescriptor output_info = compute_output_descriptor(src->desc(), weights->desc(), _info, _depth_multiplier); + if(!_out_quant_info.empty()) + { + output_info.quant_info = _out_quant_info; + } + + return output_info; } NodeType DepthwiseConvolutionLayerNode::type() const -- cgit v1.2.1