From bf959229f2250fe33fee4b03b335b93bb205465b Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Wed, 19 Jul 2017 17:01:42 +0100 Subject: COMPMID-415 Bug fix: call clFinish() at the end of all the benchmarks Change-Id: I024a8f6591404c5f1daf4dca6c4f988069d9532f Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81058 Tested-by: Kaizen Reviewed-by: Moritz Pflanzer --- framework/Framework.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'framework/Framework.cpp') diff --git a/framework/Framework.cpp b/framework/Framework.cpp index 7708537fd6..e3ada039ae 100644 --- a/framework/Framework.cpp +++ b/framework/Framework.cpp @@ -28,6 +28,7 @@ #ifdef ARM_COMPUTE_CL #include "arm_compute/core/CL/OpenCL.h" +#include "arm_compute/runtime/CL/CLScheduler.h" #endif /* ARM_COMPUTE_CL */ #include @@ -226,6 +227,12 @@ void Framework::run_test(TestCaseFactory &test_factory) { profiler.start(); test_case->do_run(); +#ifdef ARM_COMPUTE_CL + if(opencl_is_available()) + { + CLScheduler::get().sync(); + } +#endif /* ARM_COMPUTE_CL */ profiler.stop(); } -- cgit v1.2.1