From 7777b1aa865d3c17dcef31573d44fae421176109 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 11 Jul 2018 18:16:20 +0100 Subject: COMPMID-1388: Change default CLTuner to the one for the detected GPU Sets a default tuner for the detected target if no tuner is specified in default_init() Change-Id: I27f1b9bbc0df91c1940315c6cc9042720cd1d3fe Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139630 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- arm_compute/runtime/CL/CLScheduler.h | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'arm_compute/runtime/CL/CLScheduler.h') diff --git a/arm_compute/runtime/CL/CLScheduler.h b/arm_compute/runtime/CL/CLScheduler.h index bdd779bd91..8eb287c942 100644 --- a/arm_compute/runtime/CL/CLScheduler.h +++ b/arm_compute/runtime/CL/CLScheduler.h @@ -94,15 +94,6 @@ public: return CLKernelLibrary::get().context(); } - /** Accessor to set the CL context to be used by the scheduler. - * - * @param[in] context A CL context. - */ - void set_context(cl::Context context) - { - CLKernelLibrary::get().set_context(context); - } - /** Accessor for the associated CL command queue. * * @return A CL command queue. @@ -122,6 +113,15 @@ public: return _target; } + /** Accessor to set the CL context to be used by the scheduler. + * + * @param[in] context A CL context. + */ + void set_context(cl::Context context) + { + CLKernelLibrary::get().set_context(context); + } + /** Accessor to set the CL command queue to be used by the scheduler. * * @param[in] queue A CL command queue. @@ -140,6 +140,15 @@ public: _target = target; } + /** Accessor to set the CL tuner to be used by the scheduler. + * + * @param[in] tuner A CL tuner + */ + void set_tuner(ICLTuner *tuner) + { + _cl_tuner = tuner; + } + /** Blocks until all commands in the associated command queue have finished. */ void sync() { @@ -179,10 +188,11 @@ private: /** Flag to ensure symbols initialisation is happening before Scheduler creation */ static std::once_flag _initialize_symbols; - cl::CommandQueue _queue; - GPUTarget _target; - bool _is_initialised; - ICLTuner *_cl_tuner; + cl::CommandQueue _queue; + GPUTarget _target; + bool _is_initialised; + ICLTuner *_cl_tuner; + std::unique_ptr _cl_default_static_tuner; }; } #endif /* __ARM_COMPUTE_CLSCHEDULER_H__ */ -- cgit v1.2.1