From 59631a174e1b5ef23bd3a0102f60b57c99502766 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Wed, 2 May 2018 13:59:04 +0100 Subject: COMPMID-1104 Add fast math hint in the graph API Change-Id: I83db135fa94c6884e080f0229a9b6430d908c029 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129823 Tested-by: Jenkins Reviewed-by: Gian Marco Iodice Reviewed-by: Anthony Barbier --- src/graph/backends/CL/CLFunctionsFactory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/graph/backends') diff --git a/src/graph/backends/CL/CLFunctionsFactory.cpp b/src/graph/backends/CL/CLFunctionsFactory.cpp index ece63646ea..4626cb5781 100644 --- a/src/graph/backends/CL/CLFunctionsFactory.cpp +++ b/src/graph/backends/CL/CLFunctionsFactory.cpp @@ -166,6 +166,7 @@ std::unique_ptr create_convolution_layer(ConvolutionLayerNode &node, const PadStrideInfo conv_info = node.convolution_info(); const ConvolutionMethod conv_algorithm = node.convolution_method(); + const bool fast_math = node.fast_math_hint() == FastMathHint::ENABLED; // Create and configure function (we assume that functions have been validated before creation) std::shared_ptr mm = get_memory_manager(ctx, Target::CL); @@ -175,7 +176,7 @@ std::unique_ptr create_convolution_layer(ConvolutionLayerNode &node, if(conv_algorithm == ConvolutionMethod::WINOGRAD) { std::tie(func, func_name) = create_named_memory_managed_function( - std::string("CLWinogradConvolutionLayer"), mm, input, weights, biases, output, conv_info); + std::string("CLWinogradConvolutionLayer"), mm, input, weights, biases, output, conv_info, ActivationLayerInfo(), fast_math); } else if(conv_algorithm == ConvolutionMethod::DIRECT) { @@ -190,7 +191,7 @@ std::unique_ptr create_convolution_layer(ConvolutionLayerNode &node, else { std::tie(func, func_name) = create_named_memory_managed_function(std::string("CLConvolutionLayer"), mm, - input, weights, biases, output, conv_info); + input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1U, 1U), ActivationLayerInfo(), fast_math); } // Log info -- cgit v1.2.1