diff options
author | Cathal Corbett <cathal.corbett@arm.com> | 2021-12-13 13:03:22 +0000 |
---|---|---|
committer | Cathal Corbett <cathal.corbett@arm.com> | 2021-12-14 14:09:55 +0000 |
commit | 18655b8d326f6109c6fedacf42b46dc4bc942324 (patch) | |
tree | 79a4cff6e46ea41f404a693ac3a9de2787498f06 /include/armnn | |
parent | a097d2a0ed8e30d5aaf6d29ec18d0c39201b7b67 (diff) | |
download | armnn-18655b8d326f6109c6fedacf42b46dc4bc942324.tar.gz |
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 <cathal.corbett@arm.com>
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/INetwork.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
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<INetwork, void(*)(INetwork* network)>; using IOptimizedNetworkPtr = std::unique_ptr<IOptimizedNetwork, void(*)(IOptimizedNetwork* network)>; +using CompiledBlobDeleter = std::function<void(const void*)>; +using CompiledBlobPtr = std::unique_ptr<void, CompiledBlobDeleter>; + /// 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<BackendId>& backend); + /// Adds an activation layer to the network. /// @param activationDescriptor - ActivationDescriptor to configure the activation. /// @param name - Optional name for the layer. |