From b619b42118f54c2db1946aef46477926efa4b75c Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Mon, 27 Jun 2022 12:44:50 +0100 Subject: IVGCVSW-7034 Modified SubgraphView returned by GetWorkingCopy() * Add virtual GetSlotIndex to IInputSlot * Fix logic in GetWorkingCopy to use index of slots; so as not to add slots to cloned subgraphView if not in original subgraphView * Add test to cover cases when not all inputSlots to subgraphView layer are part of the original subgraphView * Mark SubgraphView::GetWorkingCopy() as const Change-Id: I1d540f84c57f97f6c834ec06ca13393ffa55d379 --- include/armnn/INetwork.hpp | 1 + include/armnn/backends/SubgraphView.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 94afbf346a..3d4be1a7fa 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -29,6 +29,7 @@ public: virtual IOutputSlot* GetConnection() = 0; virtual const IConnectableLayer& GetOwningIConnectableLayer() const = 0; virtual IConnectableLayer& GetOwningIConnectableLayer() = 0; + virtual unsigned int GetSlotIndex() const = 0; protected: /// Not user deletable. diff --git a/include/armnn/backends/SubgraphView.hpp b/include/armnn/backends/SubgraphView.hpp index dbf0544651..72d36829f4 100644 --- a/include/armnn/backends/SubgraphView.hpp +++ b/include/armnn/backends/SubgraphView.hpp @@ -156,7 +156,7 @@ public: /// Backend users should edit this working copy and then add it as a SubstitutionPair, along with original /// SubgraphView, to the OptimizationViews returned by OptimizeSubgraphView. /// ArmNN will then decide on whether or not to carry out Substitution of the two SubgraphViews. - SubgraphView GetWorkingCopy(); + SubgraphView GetWorkingCopy() const; /// These methods should be called on a working copy subgraph created from GetWorkingCopy. /// They take a SubgraphView pattern to replace and the substitute layer or subgraphView to substitute in. -- cgit v1.2.1