IVGCVSW-2458 Refactor the Optimize function (Network.cpp) so that
authorMatteo Martincigh <matteo.martincigh@arm.com>
Thu, 24 Jan 2019 14:06:23 +0000 (14:06 +0000)
committerMatteo Martincigh <matteo.martincigh@arm.com>
Wed, 30 Jan 2019 14:03:28 +0000 (14:03 +0000)
commitadddddb6cbcb777d92a8c464c9ad0cb9aecc76a3
treeb15de32bf9f8612f66e1ae23d2f8009e80e7d0e6
parentd089b74bebbcc8518fb0f4eacb7e6569ae170199
IVGCVSW-2458 Refactor the Optimize function (Network.cpp) so that
subgraphs are optimized by the backends

 * Added a new method OptimizeSubGraph to the backend interface
 * Refactored the Optimize function so that the backend-specific
   optimization is performed by the backend itself (through the new
   OptimizeSubGraph interface method)
 * Added a new ApplyBackendOptimizations function to apply the new
   changes
 * Added some new convenient constructors to the SubGraph class
 * Added AddLayer method and a pointer to the parent graph to the
   SubGraph class
 * Updated the sub-graph unit tests to match the changes
 * Added SelectSubGraphs and ReplaceSubGraphConnections overloads
   that work with sub-graphs
 * Removed unused code and minor refactoring where necessary

Change-Id: I46181794c6a9e3b10558944f804e06a8f693a6d0
18 files changed:
include/armnn/BackendId.hpp
src/armnn/Graph.cpp
src/armnn/Graph.hpp
src/armnn/Network.cpp
src/armnn/NetworkUtils.cpp
src/armnn/NetworkUtils.hpp
src/armnn/SubGraph.cpp
src/armnn/SubGraph.hpp
src/armnn/SubGraphSelector.cpp
src/armnn/SubGraphSelector.hpp
src/armnn/test/SubGraphTests.cpp
src/backends/backendsCommon/IBackendInternal.hpp
src/backends/cl/ClBackend.cpp
src/backends/cl/ClBackend.hpp
src/backends/neon/NeonBackend.cpp
src/backends/neon/NeonBackend.hpp
src/backends/reference/RefBackend.cpp
src/backends/reference/RefBackend.hpp