aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/GraphBuilder.h
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2019-03-14 10:32:11 +0000
committerIsabella Gottardi <isabella.gottardi@arm.com>2019-03-20 11:23:43 +0000
commit0ae5de9124a0094e656244ad2f807c084966fc04 (patch)
treeab698ad9c43f95dda13f78cf76b753105cf69388 /arm_compute/graph/GraphBuilder.h
parentb0c5037d94ba7073ccabb0ebaff54db320f184c4 (diff)
downloadComputeLibrary-0ae5de9124a0094e656244ad2f807c084966fc04.tar.gz
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 <isabella.gottardi@arm.com> Reviewed-on: https://review.mlplatform.org/c/852 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> 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 'arm_compute/graph/GraphBuilder.h')
-rw-r--r--arm_compute/graph/GraphBuilder.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/arm_compute/graph/GraphBuilder.h b/arm_compute/graph/GraphBuilder.h
index a2a938b1cc..590e4d9b44 100644
--- a/arm_compute/graph/GraphBuilder.h
+++ b/arm_compute/graph/GraphBuilder.h
@@ -25,6 +25,7 @@
#define __ARM_COMPUTE_GRAPH_GRAPH_BUILDER_H__
#include "arm_compute/graph/ITensorAccessor.h"
+#include "arm_compute/graph/LayerDescriptors.h"
#include "arm_compute/graph/Types.h"
namespace arm_compute
@@ -73,14 +74,16 @@ public:
static NodeID add_output_node(Graph &g, NodeParams params, NodeIdxPair input, ITensorAccessorUPtr accessor = nullptr);
/** Adds an activation layer node to the graph
*
- * @param[in] g Graph to add the node to
- * @param[in] params Common node parameters
- * @param[in] input Input to the activation layer node as a NodeID-Index pair
- * @param[in] act_info Activation layer information
+ * @param[in] g Graph to add the node to
+ * @param[in] params Common node parameters
+ * @param[in] input Input to the activation layer node as a NodeID-Index pair
+ * @param[in] act_info Activation layer information
+ * @param[in] out_quant_info (Optional) Output quantization info
*
* @return Node ID of the created node, EmptyNodeID in case of error
*/
- static NodeID add_activation_node(Graph &g, NodeParams params, NodeIdxPair input, ActivationLayerInfo act_info);
+ static NodeID add_activation_node(Graph &g, NodeParams params, NodeIdxPair input, ActivationLayerInfo act_info,
+ const QuantizationInfo out_quant_info = QuantizationInfo());
/** Adds a batch normalization layer node to the graph
*
* @param[in] g Graph to add the node to
@@ -163,14 +166,14 @@ public:
ITensorAccessorUPtr weights_accessor = nullptr, ITensorAccessorUPtr bias_accessor = nullptr);
/** Adds a depth concatenate node to the graph
*
- * @param[in] g Graph to add the node to
- * @param[in] params Common node parameters
- * @param[in] inputs Inputs to the depth concatenate layer node as a NodeID-Index pair
- * @param[in] axis Concatenation axis
+ * @param[in] g Graph to add the node to
+ * @param[in] params Common node parameters
+ * @param[in] inputs Inputs to the depth concatenate layer node as a NodeID-Index pair
+ * @param[in] concat_descriptor Concatenation layer descriptor
*
* @return Node ID of the created node, EmptyNodeID in case of error
*/
- static NodeID add_concatenate_node(Graph &g, NodeParams params, std::vector<NodeIdxPair> inputs, DataLayoutDimension axis);
+ static NodeID add_concatenate_node(Graph &g, NodeParams params, std::vector<NodeIdxPair> inputs, descriptors::ConcatLayerDescriptor concat_descriptor);
/** Adds a depth-wise convolution layer node to the graph
*
* @param[in] g Graph to add the node to
@@ -183,13 +186,15 @@ public:
* @param[in] weights_accessor (Optional) Accessor of the weights node data
* @param[in] bias_accessor (Optional) Accessor of the bias node data
* @param[in] quant_info (Optional) Weights quantization info
+ * @param[in] out_quant_info (Optional) Output quantization info
*
* @return Node ID of the created node, EmptyNodeID in case of error
*/
static NodeID add_depthwise_convolution_node(Graph &g, NodeParams params, NodeIdxPair input,
Size2D kernel_spatial_extend, PadStrideInfo conv_info, int depth_multiplier = 1,
DepthwiseConvolutionMethod method = DepthwiseConvolutionMethod::Default,
- ITensorAccessorUPtr weights_accessor = nullptr, ITensorAccessorUPtr bias_accessor = nullptr, const QuantizationInfo quant_info = QuantizationInfo());
+ ITensorAccessorUPtr weights_accessor = nullptr, ITensorAccessorUPtr bias_accessor = nullptr, const QuantizationInfo quant_info = QuantizationInfo(),
+ const QuantizationInfo out_quant_info = QuantizationInfo());
/** Adds an element-wise layer node to the graph
*
* @param[in] g Graph to add the node to