aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLScheduler.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-07-11 18:16:20 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit7777b1aa865d3c17dcef31573d44fae421176109 (patch)
tree7c50dd7262abebc9390e01f1ebccb5d487eb410f /arm_compute/runtime/CL/CLScheduler.h
parente88b9bb3e2c97bc2c3f5024f17fa6c5080ee522c (diff)
downloadComputeLibrary-7777b1aa865d3c17dcef31573d44fae421176109.tar.gz
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 <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/CLScheduler.h')
-rw-r--r--arm_compute/runtime/CL/CLScheduler.h36
1 files changed, 23 insertions, 13 deletions
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<ICLTuner> _cl_default_static_tuner;
};
}
#endif /* __ARM_COMPUTE_CLSCHEDULER_H__ */