From f2c022e54ae65467cca4bc698b5b94e5b3c62c47 Mon Sep 17 00:00:00 2001 From: cfRod Date: Fri, 5 Nov 2021 11:29:53 +0000 Subject: Enable fast_math in CpuFullyConnected ONCPUML-529 * Add support for passing fast_math for fullyconnected layers via fc_info. * Add support for passing fast_math to run ACL benchmark graphs. * Add validation test and accuracy tests (updated fixtures). Note: abs and rel. tolerance for fast math mode are set based on experimental data. Signed-off-by: cfRod change-Id: Ib107d6264d3ae5e36555334f39a13e678f8618df Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6521 Reviewed-by: SiCong Li Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- arm_compute/graph/frontend/Layers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arm_compute/graph/frontend/Layers.h') diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h index bf68b269da..fe0539bac5 100644 --- a/arm_compute/graph/frontend/Layers.h +++ b/arm_compute/graph/frontend/Layers.h @@ -776,7 +776,7 @@ public: { return GraphBuilder::add_fully_connected_layer(s.graph(), common_params, input, _num_outputs, std::move(_weights), std::move(_bias), _fc_info, - std::move(_weights_quant_info), std::move(_out_quant_info)); + std::move(_weights_quant_info), std::move(_out_quant_info), s.hints().fast_math_hint); } else { @@ -785,7 +785,7 @@ public: NodeID bias_nid = (_bias_ss == nullptr) ? EmptyNodeID : _bias_ss->tail_node(); return GraphBuilder::add_fully_connected_layer(s.graph(), common_params, input, _num_outputs, _weights_ss->tail_node(), bias_nid, _fc_info, - std::move(_out_quant_info)); + std::move(_out_quant_info), s.hints().fast_math_hint); } } -- cgit v1.2.1