diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-05-21 13:29:00 +0100 |
---|---|---|
committer | Derek Lamberti <derek.lamberti@arm.com> | 2019-05-21 15:50:06 +0000 |
commit | 05349c5e86cdb3f414c3b7bebf6a6f1d3505938b (patch) | |
tree | f7265d6946f70c5b98729c0f9159b496de17300a | |
parent | 1b3eb7e53ce9e6446196c9164c33ae25bfc41855 (diff) | |
download | armnn-05349c5e86cdb3f414c3b7bebf6a6f1d3505938b.tar.gz |
IVGCVSW-3015 Fix duplicate input/output slots in sub-graph
* Avoid collecting duplicate input/output slots during the
sub-graph selection process
* Fixes the InceptionV3 quantized run
Change-Id: I737ec8576d57184d3d25bda436a7776ec7243a0d
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
-rw-r--r-- | src/armnn/SubgraphViewSelector.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/armnn/SubgraphViewSelector.cpp b/src/armnn/SubgraphViewSelector.cpp index 8e4de0b5f8..4357ec4381 100644 --- a/src/armnn/SubgraphViewSelector.cpp +++ b/src/armnn/SubgraphViewSelector.cpp @@ -59,7 +59,12 @@ struct LayerSelectionInfo if (parentInfo == layerInfos.end() || m_SplitId != parentInfo->second.m_SplitId) { - inputSlots.push_back(&(*slot)); + // Avoid collecting duplicate input slots + InputSlot* inputSlot = &(*slot); + if (std::find(inputSlots.begin(), inputSlots.end(), inputSlot) == inputSlots.end()) + { + inputSlots.push_back(inputSlot); + } } } } @@ -77,7 +82,12 @@ struct LayerSelectionInfo if (childInfo == layerInfos.end() || m_SplitId != childInfo->second.m_SplitId) { - outputSlots.push_back(&(*slot)); + // Avoid collecting duplicate output slots + OutputSlot* outputSlot = &(*slot); + if (std::find(outputSlots.begin(), outputSlots.end(), outputSlot) == outputSlots.end()) + { + outputSlots.push_back(outputSlot); + } } } } |