From 18655b8d326f6109c6fedacf42b46dc4bc942324 Mon Sep 17 00:00:00 2001 From: Cathal Corbett Date: Mon, 13 Dec 2021 13:03:22 +0000 Subject: IVGCVSW-6630 Add new method AddPrecompiledLayer() to INetwork * Add new method AddPrecompiledLayer() to INetwork with Comments noting it is for backend users. * Added unit test to SubgraphViewTests.cpp. * Bug fix and code refactor in Graph.cpp specifically around Graph::SubstituteSubgraph(SubgraphView& subgraph, IConnectableLayer* substituteLayer) Change-Id: If2d816e5109e48ce920bf92d8823b39130c23a16 Signed-off-by: Cathal Corbett --- include/armnn/INetwork.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 1d98821160..4da01a62db 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -225,6 +225,9 @@ class NetworkImpl; using INetworkPtr = std::unique_ptr; using IOptimizedNetworkPtr = std::unique_ptr; +using CompiledBlobDeleter = std::function; +using CompiledBlobPtr = std::unique_ptr; + /// Main network class which provides the interface for building up a neural network. /// This object is subsequently required by the IRuntime::Load() method. class INetwork @@ -413,6 +416,16 @@ public: IConnectableLayer* AddPooling3dLayer(const Pooling3dDescriptor& pooling3dDescriptor, const char* name = nullptr); + /// Adds a Precompiled layer to the network. + /// Method use is for backend users. + /// @param preCompiledDescriptor - PreCompiledDescriptor contains parameters for the Precompiled layer. + /// @param compiledBlobPtr - CompiledBlobPtr pre-compiled object set for the Precompiled layer. + /// @param backend - optional BackendId set for the Precompiled layer. + /// @return - Interface for configuring the layer. + IConnectableLayer* AddPrecompiledLayer(const PreCompiledDescriptor& preCompiledDescriptor, + CompiledBlobPtr& compiledBlobPtr, + const Optional& backend); + /// Adds an activation layer to the network. /// @param activationDescriptor - ActivationDescriptor to configure the activation. /// @param name - Optional name for the layer. -- cgit v1.2.1