aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Graph.hpp
diff options
context:
space:
mode:
authorCathal Corbett <catcor01@e127348.nice.arm.com>2021-10-07 11:46:40 +0100
committerCathal Corbett <cathal.corbett@arm.com>2021-10-08 11:28:35 +0000
commit521032fd424cf86681eb125afbf5eaee47d8c585 (patch)
tree65162778f203638f1c039097b8240422f99dad76 /src/armnn/Graph.hpp
parent723bc3b5d8a911a369eee658631d9f107ea09896 (diff)
downloadarmnn-521032fd424cf86681eb125afbf5eaee47d8c585.tar.gz
IVGCVSW-6417: Catch AddFullyConnected API error when weights TensorInfo isn't set
* Updated code in Graph.cpp InferTensorInfos() to be more descriptive. * Added method VerifyConstantLayerSetTensorInfo() in Graph.cpp/hpp to error when ConstantLayer TensorInfo is not set. * Updated Optimize() in Network.cpp to call VerifyConstantLayerSetTensorInfo(). * Added unit test with ConstantLayer TensorInfo not set to catch error in VerifyConstantLayerSetTensorInfo(). * Added comments around method VerifyConstantLayerSetTensorInfo(). Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I366596243f7c5823676222e2d0cce1335bc8c325
Diffstat (limited to 'src/armnn/Graph.hpp')
-rw-r--r--src/armnn/Graph.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/armnn/Graph.hpp b/src/armnn/Graph.hpp
index 731ae1e5aa..d5fbeafed0 100644
--- a/src/armnn/Graph.hpp
+++ b/src/armnn/Graph.hpp
@@ -203,6 +203,10 @@ public:
void SubstituteSubgraph(SubgraphView& subgraph, IConnectableLayer* substituteLayer);
void SubstituteSubgraph(SubgraphView& subgraph, const SubgraphView& substituteSubgraph);
+ /// For each ConstantLayer in Graph, ensures TensorInfo is set on all output slots.
+ /// LayerValidationException thrown if no TensorInfo is set.
+ void VerifyConstantLayerSetTensorInfo() const;
+
void InferTensorInfos();
void AttachObservable(IGraphObservable* const observable, GraphEvent notifyOnEvent) {