diff options
-rw-r--r-- | src/graph/Graph.cpp | 6 | ||||
-rw-r--r-- | src/graph/detail/ExecutionHelpers.cpp | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/graph/Graph.cpp b/src/graph/Graph.cpp index ad6f200d36..af75eacc02 100644 --- a/src/graph/Graph.cpp +++ b/src/graph/Graph.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 Arm Limited. + * Copyright (c) 2018-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -51,9 +51,9 @@ bool Graph::remove_node(NodeID nid) // Remove output connections std::set<EdgeID> output_edges_copy = node->output_edges(); - for(auto &outpud_eid : output_edges_copy) + for(auto &output_eid : output_edges_copy) { - remove_connection(outpud_eid); + remove_connection(output_eid); } // Remove nid from tagged nodes diff --git a/src/graph/detail/ExecutionHelpers.cpp b/src/graph/detail/ExecutionHelpers.cpp index d5752a9f95..5be3706cfe 100644 --- a/src/graph/detail/ExecutionHelpers.cpp +++ b/src/graph/detail/ExecutionHelpers.cpp @@ -196,9 +196,12 @@ void call_all_const_node_accessors(Graph &g) for(auto &node : nodes) { - if(node != nullptr && node->type() == NodeType::Const) + if(node != nullptr && node->type() == NodeType::Const && node->num_outputs()) { - call_tensor_accessor(node->output(0)); + if(!node->output(0)->bound_edges().empty()) + { + call_tensor_accessor(node->output(0)); + } } } } |