diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2019-04-30 10:17:40 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2019-04-30 12:42:19 +0100 |
commit | d78b891d30b9b3a1aaf29e46c1d008bdc6bcd674 (patch) | |
tree | 1d0877c0f673af1305213454c186604b265fdd27 /src/armnn/Layer.cpp | |
parent | 386681af17ec143a0ea6f503e579e5cd8a334966 (diff) | |
download | armnn-d78b891d30b9b3a1aaf29e46c1d008bdc6bcd674.tar.gz |
IVGCVSW-3021 Add end-to-end flow control integration test
Currently asserts that the net fails to optimise as that
is the expected behaviour, but it's complete enough to
exercise most of the code in SwitchLayer.cpp and MergeLayer.cpp
Also, fix a bug in SwitchLayer::ValidateTensorShapesFromInputs
found by the new test.
Also, make topological sort slightly more robust to missing connections
as it should not be the job of the sorter to validate the graph.
Change-Id: I30b9e2d4769ab14a6820284871a79a5bb3eef1ef
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Diffstat (limited to 'src/armnn/Layer.cpp')
-rw-r--r-- | src/armnn/Layer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp index 0a6328ba3d..ced87b095c 100644 --- a/src/armnn/Layer.cpp +++ b/src/armnn/Layer.cpp @@ -262,8 +262,17 @@ LayerPriority Layer::GetPriority() const auto maxPrio = [](const LayerPriority prio, const InputSlot& slot) -> LayerPriority { - const Layer& input = slot.GetConnectedOutputSlot()->GetOwningLayer(); - return std::max(prio, input.GetPriority()); + const OutputSlot *outputSlot = slot.GetConnectedOutputSlot(); + if (outputSlot) + { + const Layer& input = outputSlot->GetOwningLayer(); + return std::max(prio, input.GetPriority()); + } + else + { + // unconnected input slot + return prio; + } }; m_Visiting = true; |