diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2017-11-09 17:05:07 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | b28f29d5f5657b606921faf4c6dcc2ced1465cc7 (patch) | |
tree | 34560537d03f9766af55b470cd4344b8339c7817 /src/graph/Graph.cpp | |
parent | a3b1b469276b10484cd45901ae3a4b48b506caa9 (diff) | |
download | ComputeLibrary-b28f29d5f5657b606921faf4c6dcc2ced1465cc7.tar.gz |
COMPMID-652 - Graph examples shouldn't need to link against OpenCL
- Added --no-allow-shlib-undefined to library builds to make sure we
don't leave any unresolved symbol
- Added --allow-shlib-undefined to the graph examples build lines so that
it doesn't matter whether or not OpenCL is supported by the Graph
librarylibrary
- Don't link tests statically anymore on Android (This was probably
required in the past because we were duplicating symbols in the
core and runtime libraries, but it doesn't seem to be an issue
anymore)
- Updated Doxygen accordingly
Change-Id: I9905f388e0838bc8e3369de52838bf980b992ead
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95172
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/graph/Graph.cpp')
-rw-r--r-- | src/graph/Graph.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/graph/Graph.cpp b/src/graph/Graph.cpp index b86330b658..ac5316f55e 100644 --- a/src/graph/Graph.cpp +++ b/src/graph/Graph.cpp @@ -28,6 +28,7 @@ #include "arm_compute/graph/INode.h" #include "arm_compute/graph/ITensorObject.h" #include "arm_compute/graph/Tensor.h" +#include "arm_compute/runtime/CL/CLScheduler.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/Tensor.h" #include "support/ToolchainSupport.h" @@ -75,6 +76,11 @@ Graph::~Graph() //NOLINT Graph::Graph() : _pimpl{ new Private() } { + // Check if OpenCL is available and initialize the scheduler + if(opencl_is_available()) + { + arm_compute::CLScheduler::get().default_init(); + } } void Graph::run() @@ -209,6 +215,10 @@ void Graph::add_tensor_object(std::unique_ptr<ITensorObject> tensor) _pimpl->_graph_output->allocate(); } } +bool Graph::opencl_is_available() +{ + return arm_compute::opencl_is_available(); +} void Graph::set_temp(TensorInfo &&tmp) { |