diff options
author | Cathal Corbett <cathal.corbett@arm.com> | 2021-12-15 17:12:59 +0000 |
---|---|---|
committer | Cathal Corbett <cathal.corbett@arm.com> | 2021-12-23 13:21:22 +0000 |
commit | cbfd718464b8ac41f0338ae6565d8213d24c0a2a (patch) | |
tree | f26da835108a0ed52ac0ffc8f7ebec64827b5033 /include | |
parent | 81edc6217f76953c0be4c47f3d005cf48772ccb7 (diff) | |
download | armnn-cbfd718464b8ac41f0338ae6565d8213d24c0a2a.tar.gz |
IVGCVSW-6632 OptimizationViews: has INetwork rather than Graph for holding layers
* Deprecate the GetGraph() function in OptimizationViews & remove/fix
occurances where OptimizationViews.GetGraph() is called.
* OptimizationViews has member INetworkPtr.
* OptimizationViews has GetINetwork() method.
* Unit test added to OptimizationViewsTests.cpp.
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: Ifc1e53f1c34d786502279631942f0472f401038e
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/INetwork.hpp | 3 | ||||
-rw-r--r-- | include/armnn/backends/OptimizationViews.hpp | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 4da01a62db..3e607256ec 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -424,7 +424,8 @@ public: /// @return - Interface for configuring the layer. IConnectableLayer* AddPrecompiledLayer(const PreCompiledDescriptor& preCompiledDescriptor, CompiledBlobPtr& compiledBlobPtr, - const Optional<BackendId>& backend); + const Optional<BackendId>& backend, + const char* name = nullptr); /// Adds an activation layer to the network. /// @param activationDescriptor - ActivationDescriptor to configure the activation. diff --git a/include/armnn/backends/OptimizationViews.hpp b/include/armnn/backends/OptimizationViews.hpp index c357c0c8bb..f3479febd3 100644 --- a/include/armnn/backends/OptimizationViews.hpp +++ b/include/armnn/backends/OptimizationViews.hpp @@ -56,8 +56,11 @@ public: bool Validate(const SubgraphView& originalSubgraph) const; + ARMNN_DEPRECATED_MSG_REMOVAL_DATE("GetGraph is deprecated. Use GetINetwork instead.", "22.08") Graph& GetGraph() { return m_Graph; } + INetworkPtr& GetINetwork() { return m_INetwork; } + private: Substitutions m_SuccesfulOptimizations; ///< Proposed substitutions from successful optimizations Subgraphs m_FailedOptimizations; ///< Subgraphs from the original subgraph which cannot be supported @@ -65,6 +68,11 @@ private: /// Graph object used only as a container for any layer generated by the optimization process Graph m_Graph; + + /// INetworkPtr object used only as a container for any layer generated by the optimization process + /// Also, can use to AddPrecompiledLayer to the SubstitutionPair + /// Use in favour of m_Graph which depreciates 22.08 + INetworkPtr m_INetwork = INetwork::Create();; }; } //namespace armnn |