IVGCVSW-3029 Remove any AddLayer capabilities from SubgraphView
* Removed the reference to the parent graph in SubgraphView
* Removed the AddLayer method in SubgraphView
* Updated the code where necessary to adapt to the new changes in
SubgraphView
* Fixed a check in the CreatePreCompiledWorkloadTest test function
Change-Id: I4d3af87f11ec3cd8f18a21b250a2d295da56e1a0
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index 9ef0c56..1047567 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -348,13 +348,13 @@
// Select sub-graphs based on backend
SubgraphViewSelector::Subgraphs subgraphs =
SubgraphViewSelector::SelectSubgraphs(mainSubgraph,
- // Select layers assigned to the requested backend
- [&backendObjPtr](const Layer& layer)
- {
- return layer.GetType() != LayerType::Input &&
- layer.GetType() != LayerType::Output &&
- layer.GetBackendId() == backendObjPtr->GetId();
- });
+ // Select layers assigned to the requested backend
+ [&backendObjPtr](const Layer& layer)
+ {
+ return layer.GetType() != LayerType::Input &&
+ layer.GetType() != LayerType::Output &&
+ layer.GetBackendId() == backendObjPtr->GetId();
+ });
if (subgraphs.empty())
{
// No sub-graphs found, try with next selected backend
@@ -388,9 +388,6 @@
BOOST_ASSERT(l);
l->SetBackendId(selectedBackend);
});
-
- // Recreate the sub-graph representing the entire graph
- mainSubgraph.Update(optGraph);
}
else
{