From 6194145681232bf59e0455434f15aba42956145b Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Tue, 21 Nov 2017 17:49:07 +0000 Subject: COMPMID-694: Fix condition which decides whether or not to profile a run Change-Id: I4853a4d83a13b162d5759434a4e800c8f9e05cce Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110108 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Georgios Pinitas --- tests/framework/Framework.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/framework') diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp index abd32e64e8..94afc87f00 100644 --- a/tests/framework/Framework.cpp +++ b/tests/framework/Framework.cpp @@ -299,7 +299,13 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory) for(int i = 0; i < _num_iterations; ++i) { - if(_num_iterations > 1 && i != 0) + //Start the profiler if: + //- there is only one iteration + //- it's not the first iteration of a multi-iterations run. + // + //Reason: if the CLTuner is enabled then the first run will be really messy + //as each kernel will be executed several times, messing up the instruments like OpenCL timers. + if(_num_iterations == 1 || i != 0) { profiler.start(); } @@ -316,7 +322,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory) GCScheduler::get().sync(); } #endif /* ARM_COMPUTE_GC */ - if(_num_iterations > 1 && i != 0) + if(_num_iterations == 1 || i != 0) { profiler.stop(); } -- cgit v1.2.1