From e3fba0afa892c66379da1e3d3843f2155a1fb29a Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 14 Feb 2018 14:18:01 +0000 Subject: 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 Reviewed-by: Anthony Barbier Reviewed-by: Georgios Pinitas --- src/graph/Graph.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/graph') 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 _current_node{ nullptr }; ITensorObject *_current_output{ nullptr }; bool _info_enabled{ false }; + CLTuner _tuner{}; private: ITensorObject *_current_input{ nullptr }; @@ -75,11 +76,22 @@ 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(); + } } } -- cgit v1.2.1