From 1d18e6f74f7a76befe64fa34e7dbfaa8580875ee Mon Sep 17 00:00:00 2001 From: Rob Hughes Date: Mon, 23 Sep 2019 16:31:28 +0100 Subject: 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 --- src/armnn/optimizations/OptimizeConsecutiveReshapes.hpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/armnn/optimizations') 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(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(); } -- cgit v1.2.1