diff options
author | Matthew Bentham <Matthew.Bentham@arm.com> | 2019-11-01 13:29:48 +0000 |
---|---|---|
committer | Matthew Bentham <Matthew.Bentham@arm.com> | 2019-11-01 14:57:02 +0000 |
commit | 584a2b83338a1190eb2d1840a477fd65b7dc4844 (patch) | |
tree | 5cf7bf026a973540d02b578bc8d8284d9006b35e /src/armnn | |
parent | fe414cfaecbc83edc29869f32932b9e42d69136f (diff) | |
download | armnn-584a2b83338a1190eb2d1840a477fd65b7dc4844.tar.gz |
Better error reporting for unconnected layers
Change-Id: I3c461e5449cf4bfa94d6d5e8dee03c210f2734e5
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
Diffstat (limited to 'src/armnn')
-rw-r--r-- | src/armnn/Graph.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/armnn/Graph.cpp b/src/armnn/Graph.cpp index 5e2acd55a3..4e02be3531 100644 --- a/src/armnn/Graph.cpp +++ b/src/armnn/Graph.cpp @@ -490,9 +490,22 @@ void Graph::InferTensorInfos() { for (auto&& input : layer->GetInputSlots()) { - boost::ignore_unused(input); - BOOST_ASSERT_MSG(input.GetConnectedOutputSlot()->IsTensorInfoSet(), - "All inputs must have the TensorInfo set at this point."); + const IOutputSlot* source = input.GetConnectedOutputSlot(); + if (source == NULL) + { + std::ostringstream message; + message << "Input not connected on " + << GetLayerTypeAsCString(layer->GetType()) + << " layer \"" + << layer->GetName() + << "\""; + throw LayerValidationException(message.str()); + } + + if (!source->IsTensorInfoSet()) + { + throw LayerValidationException("All inputs must have the TensorInfo set at this point."); + } } layer->ValidateTensorShapesFromInputs(); } |