diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-02-14 14:18:01 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:47:18 +0000 |
commit | e3fba0afa892c66379da1e3d3843f2155a1fb29a (patch) | |
tree | 2a420a3d988d269cc157d73e8d3c8accf1d21af8 /src/graph | |
parent | f07d28d9ee8ae73a93fe433f72855b6dcf58ad90 (diff) | |
download | ComputeLibrary-e3fba0afa892c66379da1e3d3843f2155a1fb29a.tar.gz |
COMPMID-925: Enabling OpenCL tuner in the graph examples
Change-Id: I4fe501281f527e20e8fdd0253d59ea2c4629056b
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/120354
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/graph')
-rw-r--r-- | src/graph/Graph.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/graph/Graph.cpp b/src/graph/Graph.cpp index e14bea0846..7af313acbb 100644 --- a/src/graph/Graph.cpp +++ b/src/graph/Graph.cpp @@ -62,6 +62,7 @@ public: std::unique_ptr<INode> _current_node{ nullptr }; ITensorObject *_current_output{ nullptr }; bool _info_enabled{ false }; + CLTuner _tuner{}; private: ITensorObject *_current_input{ nullptr }; @@ -76,10 +77,21 @@ Graph::~Graph() //NOLINT Graph::Graph() : _pimpl{ new Private() } { +} + +void Graph::graph_init(const bool use_cl_tuner) +{ // Check if OpenCL is available and initialize the scheduler if(opencl_is_available()) { - arm_compute::CLScheduler::get().default_init(); + if(use_cl_tuner) + { + arm_compute::CLScheduler::get().default_init(&_pimpl->_tuner); + } + else + { + arm_compute::CLScheduler::get().default_init(); + } } } |