From a3221e6772dc371cf5de7e525bf5c22b58ad6d08 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 3 May 2018 15:57:48 +0100 Subject: COMPMID-1106 Add fast math support in NEWinogradConvolutionLayer Change-Id: I5fcbbb3b6f22204f0aaebbc319dfdf03593577e8 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/130067 Tested-by: Jenkins Reviewed-by: Anthony Barbier Reviewed-by: Gian Marco Iodice --- .../fixtures/WinogradConvolutionLayerFixture.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tests/validation/fixtures') diff --git a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h index e15931eafb..ef596e0bae 100644 --- a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h +++ b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h @@ -153,7 +153,7 @@ protected: SimpleTensor _reference{}; }; -template +template class WinogradConvolutionLayerFastMathValidationFixture : public framework::Fixture { public: @@ -198,8 +198,9 @@ protected: // Create and configure function FunctionType conv; - ARM_COMPUTE_EXPECT(static_cast(conv.validate(src.info(), weights.info(), bias.info(), dst.info(), info, act_info, true /* Enable fast math */)), framework::LogLevel::ERRORS); - conv.configure(&src, &weights, &bias, &dst, info, act_info, true /* Enable fast math */); + ARM_COMPUTE_EXPECT(static_cast(conv.validate(src.info(), weights.info(), (use_bias) ? bias.info() : nullptr, dst.info(), info, act_info, true /* Enable fast math */)), + framework::LogLevel::ERRORS); + conv.configure(&src, &weights, (use_bias) ? &bias : nullptr, &dst, info, act_info, true /* Enable fast math */); ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS); ARM_COMPUTE_EXPECT(weights.info()->is_resizable(), framework::LogLevel::ERRORS); @@ -239,7 +240,14 @@ protected: // Fill reference fill(src, 0, -1.f, 1.f); fill(weights, 1, -1.f, 1.f); - fill(bias, 2, -1.f, 1.f); + if(use_bias) + { + fill(bias, 2, -1.f, 1.f); + } + else + { + fill(bias, 2, 0.f, 0.f); + } WinogradInfo winograd_info(Size2D(4U, 4U), Size2D(weights_shape[0], weights_shape[1]), -- cgit v1.2.1