aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-11-21 17:49:07 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:41:04 +0000
commit6194145681232bf59e0455434f15aba42956145b (patch)
tree6aa205b00b7719d237ad0eb75d922ff5f6992d60 /tests/framework
parentd7779da59c5c8f9efd4c45ab646460f2963b520b (diff)
downloadComputeLibrary-6194145681232bf59e0455434f15aba42956145b.tar.gz
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 <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/Framework.cpp10
1 files changed, 8 insertions, 2 deletions
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();
}