From 8b72199f25487040713d1668c998fdde3707413c Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 28 Oct 2019 16:24:28 +0000 Subject: COMPMID-1889: Fuse bias addition and output stage in CLFCLayer. Delegates bias addition and output stage calculation in CLGEMMLowp/CLGEMM respectively. Change-Id: Ifd1f75b34eae766d3df80f07aec35fab45733e0b Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/2175 Reviewed-by: Michele Di Giorgio Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h b/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h index 9512b22c08..7f872532e4 100644 --- a/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h +++ b/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h @@ -174,9 +174,9 @@ public: void prepare() override; private: - void configure_fc_fc(const ICLTensor *input, const ICLTensor *weights, ICLTensor *output, bool retain_internal_weights); - void configure_conv_fc(const ICLTensor *input, const ICLTensor *weights, ICLTensor *output, bool retain_internal_weights); - void configure_mm(const ICLTensor *input, const ICLTensor *weights, ICLTensor *output, bool retain_internal_weights); + void configure_fc_fc(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, bool retain_internal_weights); + void configure_conv_fc(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, bool retain_internal_weights); + void configure_mm(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, bool retain_internal_weights); MemoryGroup _memory_group; IWeightsManager *_weights_manager; @@ -187,16 +187,12 @@ private: CLFullyConnectedLayerReshapeWeights _reshape_weights_function; CLGEMM _mm_gemm; CLGEMMLowpMatrixMultiplyCore _mm_gemmlowp; - CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint _gemmlowp_output_stage; - CLGEMMMatrixAccumulateBiasesKernel _accumulate_biases_kernel; // TODO(COMPMID-1889): Use CLGEMM to add bias in CLFullyConnectedLayer CLTensor _flatten_output; - CLTensor _gemmlowp_output; CLTensor _converted_weights_output; CLTensor _reshape_weights_output; bool _are_weights_converted; bool _are_weights_reshaped; bool _is_fc_after_conv; - bool _accumulate_biases; bool _is_quantized; bool _is_prepared; const ICLTensor *_original_weights; -- cgit v1.2.1