From 08346e9b9a7dadd2f0765aea64e656902d843e8a Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 16 Oct 2018 19:10:46 +0100 Subject: COMPMID-1451:Fuse RELU,LU_BOUNDED_RELU with requantization in NEGEMMConvolutionLayer. Change-Id: Iea5f2c5bcac8051c4c7655a6eabb2c43772eb31f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/154104 Tested-by: bsgcomp Reviewed-by: Michele DiGiorgio Reviewed-by: Gian Marco Iodice --- src/graph/backends/NEON/NEFunctionFactory.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/graph/backends/NEON/NEFunctionFactory.cpp') diff --git a/src/graph/backends/NEON/NEFunctionFactory.cpp b/src/graph/backends/NEON/NEFunctionFactory.cpp index 286c890088..e967c1be61 100644 --- a/src/graph/backends/NEON/NEFunctionFactory.cpp +++ b/src/graph/backends/NEON/NEFunctionFactory.cpp @@ -97,8 +97,9 @@ std::unique_ptr create_convolution_layerinfo()->set_data_type(DataType::S32); } - const PadStrideInfo conv_info = node.convolution_info(); - const ConvolutionMethod conv_algorithm = node.convolution_method(); + const PadStrideInfo conv_info = node.convolution_info(); + const ConvolutionMethod conv_algorithm = node.convolution_method(); + const ActivationLayerInfo fused_act = node.fused_activation(); // Create and configure function (we assume that functions have been validated before creation) std::shared_ptr mm = get_memory_manager(ctx, Target::NEON); @@ -107,22 +108,22 @@ std::unique_ptr create_convolution_layer( - std::string("DirectConvolutionLayer"), mm, input, weights, biases, output, conv_info); + std::string("DirectConvolutionLayer"), mm, input, weights, biases, output, conv_info, fused_act); } else if(conv_algorithm == ConvolutionMethod::GEMM) { std::tie(func, func_name) = create_named_memory_managed_function( - std::string("GEMMConvolutionLayer"), mm, input, weights, biases, output, conv_info); + std::string("GEMMConvolutionLayer"), mm, input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1, 1), fused_act); } else if(conv_algorithm == ConvolutionMethod::Winograd) { std::tie(func, func_name) = create_named_memory_managed_function( - std::string("WinogradConvolutionLayer"), mm, input, weights, biases, output, conv_info); + std::string("WinogradConvolutionLayer"), mm, input, weights, biases, output, conv_info, fused_act); } else { std::tie(func, func_name) = create_named_memory_managed_function( - std::string("ConvolutionLayer"), mm, input, weights, biases, output, conv_info); + std::string("ConvolutionLayer"), mm, input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1, 1), fused_act); } // Log info @@ -140,6 +141,7 @@ std::unique_ptr create_convolution_layerinfo()->tensor_shape() << " Weights shape: " << weights->info()->tensor_shape() << " Output shape: " << output->info()->tensor_shape() + << (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "") << std::endl); return func; } -- cgit v1.2.1