aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorRob Hughes <robert.hughes@arm.com>2019-09-23 16:31:28 +0100
committerÁron Virginás-Tar <aron.virginas-tar@arm.com>2019-09-24 13:32:53 +0000
commit1d18e6f74f7a76befe64fa34e7dbfaa8580875ee (patch)
treea5b2f3ecf98a3b73c40fc0c3e6edc9a8a98fa596 /src/armnn
parentf74ff2ff7f67ff0141c058a242758de97e10dd99 (diff)
downloadarmnn-1d18e6f74f7a76befe64fa34e7dbfaa8580875ee.tar.gz
NNXSW-1826 OptimizeConsecutiveReshapes: remove unnecessary call to MoveAllConnections
This is called at a time when newReshape has nothing connected to its output slot (as it has just been created) and so is a no-op. The code comment indicated that the intention was to connect the newReshape to its *input*, but that has already been done in the InsertNewLayer() call above, so the comment was incorrect. There is a unit test covering this case ("OptimizeConsecutiveReshapesTest") Change-Id: I933d5d1c6eb32f5a8269fb5d7c809cd7c89680d1 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/optimizations/OptimizeConsecutiveReshapes.hpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/armnn/optimizations/OptimizeConsecutiveReshapes.hpp b/src/armnn/optimizations/OptimizeConsecutiveReshapes.hpp
index 5047d5d678..f2dd7d23ec 100644
--- a/src/armnn/optimizations/OptimizeConsecutiveReshapes.hpp
+++ b/src/armnn/optimizations/OptimizeConsecutiveReshapes.hpp
@@ -37,8 +37,6 @@ public:
auto& newReshape = *graph.InsertNewLayer<ReshapeLayer>(base.GetInputSlot(0), descriptor, name.c_str());
// Sets tensor info for new layer.
newReshape.GetOutputHandler().SetTensorInfo(outInfo);
- // Reconnects base with original parent.
- newReshape.GetOutputSlot().MoveAllConnections(*parentOut);
// Parent is now the new layer.
parentOut = &newReshape.GetOutputSlot();
}