From bb54e4e40b7b08c509e234cd91ebd3087af66c23 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 5 Apr 2018 17:20:34 +0100 Subject: COMPMID-797 Integrate Mobilenet QASYMM8 with new graph. Change-Id: I4df63ec2f4eb27a8a6eec2bea27741bf8dec6910 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/126966 Tested-by: Jenkins Reviewed-by: Anthony Barbier --- src/graph/backends/GLES/GCFunctionsFactory.cpp | 32 +++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src/graph/backends/GLES/GCFunctionsFactory.cpp') diff --git a/src/graph/backends/GLES/GCFunctionsFactory.cpp b/src/graph/backends/GLES/GCFunctionsFactory.cpp index 12e7c042d4..d3c5737e68 100644 --- a/src/graph/backends/GLES/GCFunctionsFactory.cpp +++ b/src/graph/backends/GLES/GCFunctionsFactory.cpp @@ -154,10 +154,16 @@ std::unique_ptr create_convolution_layer(ConvolutionLayerNode &node, ARM_COMPUTE_ERROR_ON(node.num_outputs() != 1); // Extract IO and info - IGCTensor *input = get_backing_tensor(node.input(0)); - IGCTensor *weights = get_backing_tensor(node.input(1)); - IGCTensor *biases = get_backing_tensor(node.input(2)); - IGCTensor *output = get_backing_tensor(node.output(0)); + IGCTensor *input = get_backing_tensor(node.input(0)); + IGCTensor *weights = get_backing_tensor(node.input(1)); + IGCTensor *biases = get_backing_tensor(node.input(2)); + IGCTensor *output = get_backing_tensor(node.output(0)); + + if(is_data_type_quantized_asymmetric(input->info()->data_type())) + { + biases->info()->set_data_type(DataType::S32); + } + const PadStrideInfo conv_info = node.convolution_info(); const ConvolutionMethod conv_algorithm = node.convolution_method(); @@ -180,6 +186,8 @@ std::unique_ptr create_convolution_layer(ConvolutionLayerNode &node, // Log info ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " << func_name << " Data Type: " << input->info()->data_type() + << " Input QuantInfo: " << input->info()->quantization_info() + << " Weights QuantInfo: " << weights->info()->quantization_info() << " Input shape: " << input->info()->tensor_shape() << " Weights shape: " << weights->info()->tensor_shape() << " Output shape: " << output->info()->tensor_shape() @@ -241,10 +249,16 @@ std::unique_ptr create_depthwise_convolution_layer(DepthwiseConvoluti ARM_COMPUTE_ERROR_ON(node.num_outputs() != 1); // Extract IO and info - IGCTensor *input = get_backing_tensor(node.input(0)); - IGCTensor *weights = get_backing_tensor(node.input(1)); - IGCTensor *biases = get_backing_tensor(node.input(2)); - IGCTensor *output = get_backing_tensor(node.output(0)); + IGCTensor *input = get_backing_tensor(node.input(0)); + IGCTensor *weights = get_backing_tensor(node.input(1)); + IGCTensor *biases = get_backing_tensor(node.input(2)); + IGCTensor *output = get_backing_tensor(node.output(0)); + + if(is_data_type_quantized_asymmetric(input->info()->data_type())) + { + biases->info()->set_data_type(DataType::S32); + } + const PadStrideInfo conv_info = node.convolution_info(); const DepthwiseConvolutionMethod dwc_algorithm = node.depthwise_convolution_method(); @@ -264,6 +278,8 @@ std::unique_ptr create_depthwise_convolution_layer(DepthwiseConvoluti // Log info ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated " << func_name << " Data Type: " << input->info()->data_type() + << " Input QuantInfo: " << input->info()->quantization_info() + << " Weights QuantInfo: " << weights->info()->quantization_info() << " Input shape: " << input->info()->tensor_shape() << " Weights shape: " << weights->info()->tensor_shape() << " Output shape: " << output->info()->tensor_shape() -- cgit v1.2.1