aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/backends/FunctionHelpers.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/backends/FunctionHelpers.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/backends/FunctionHelpers.h')
-rw-r--r--arm_compute/graph/backends/FunctionHelpers.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/arm_compute/graph/backends/FunctionHelpers.h b/arm_compute/graph/backends/FunctionHelpers.h
index d0035d9a84..4a423d2490 100644
--- a/arm_compute/graph/backends/FunctionHelpers.h
+++ b/arm_compute/graph/backends/FunctionHelpers.h
@@ -109,7 +109,7 @@ std::unique_ptr<IFunction> create_activation_layer(ActivationLayerNode &node)
ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
<< node.name()
<< " Type: " << node.type()
- << " Target " << TargetInfo::TargetType
+ << " Target: " << TargetInfo::TargetType
<< " Data Type: " << input->info()->data_type()
<< " Shape: " << input->info()->tensor_shape()
<< " Activation function: " << act_info.activation()
@@ -245,8 +245,10 @@ std::unique_ptr<IFunction> create_bounding_box_transform_layer(BoundingBoxTransf
func->configure(input, output, deltas, bbox_info);
// Log info
- ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " << node.type()
- << " Target " << TargetInfo::TargetType
+ ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
+ << node.name()
+ << " Type: " << node.type()
+ << " Target: " << TargetInfo::TargetType
<< " Data Type: " << input->info()->data_type()
<< " Shape: " << input->info()->tensor_shape()
<< " BoundingBox Info img W: " << bbox_info.img_width() << " "
@@ -326,6 +328,12 @@ std::unique_ptr<arm_compute::IFunction> create_concatenate_layer(ConcatenateLaye
func->configure(inputs, output, concat_axis);
// Log info
+ const bool is_quantized = is_data_type_quantized_asymmetric(output->info()->data_type());
+ std::ostringstream qss;
+ if(is_quantized)
+ {
+ qss << " Output QuantInfo: " << output->info()->quantization_info();
+ }
ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
<< node.name()
<< " Type: " << node.type()
@@ -334,6 +342,7 @@ std::unique_ptr<arm_compute::IFunction> create_concatenate_layer(ConcatenateLaye
<< " Shape: " << output->info()->tensor_shape()
<< " Num Inputs: " << inputs.size()
<< " Axis: " << concat_axis
+ << qss.str()
<< std::endl);
return std::move(func);
@@ -421,10 +430,10 @@ std::unique_ptr<IFunction> create_convolution_layer(ConvolutionLayerNode &node,
<< " Target: " << TargetInfo::TargetType
<< " Data Type: " << input->info()->data_type()
<< " Groups: " << num_groups
- << qss.str()
<< " Input shape: " << input->info()->tensor_shape()
<< " Weights shape: " << weights->info()->tensor_shape()
<< " Output shape: " << output->info()->tensor_shape()
+ << qss.str()
<< (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "")
<< std::endl);
return func;
@@ -536,11 +545,11 @@ std::unique_ptr<IFunction> create_depthwise_convolution_layer(DepthwiseConvoluti
<< " Type: " << func_name
<< " Target: " << TargetInfo::TargetType
<< " Data Type: " << input->info()->data_type()
- << qss.str()
<< " Input shape: " << input->info()->tensor_shape()
<< " Weights shape: " << weights->info()->tensor_shape()
<< " Output shape: " << output->info()->tensor_shape()
<< " Depth multiplier: " << depth_multiplier
+ << qss.str()
<< (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "")
<< std::endl);
return func;
@@ -1177,8 +1186,10 @@ std::unique_ptr<IFunction> create_roi_align_layer(ROIAlignLayerNode &node)
func->configure(input, rois, output, pool_info);
// Log info
- ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " << node.type()
- << " Target " << TargetInfo::TargetType
+ ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
+ << node.name()
+ << " Type: " << node.type()
+ << " Target: " << TargetInfo::TargetType
<< " Data Type: " << input->info()->data_type()
<< " Input shape: " << input->info()->tensor_shape()
<< " Output shape: " << output->info()->tensor_shape()