Browse Source

Filter out the node not seen in the stack.

tags/v1.1.0
Zhang Qinghua 5 years ago
parent
commit
b45c38ffaa
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/core/ir/graph_utils.cc

+ 2
- 2
mindspore/core/ir/graph_utils.cc View File

@@ -77,12 +77,12 @@ std::vector<AnfNodePtr> TopoSort(const AnfNodePtr &root, const SuccFunc &succ, c
auto circle_node_it = std::find(todo.begin(), todo.end(), next);
for (; circle_node_it != todo.end(); circle_node_it++) {
auto circle_node = *circle_node_it;
if (circle_node->seen_) {
if (circle_node->seen_ == seen) {
MS_LOG(ERROR) << "#" << pos << ": " << circle_node->DebugString();
pos++;
}
}
MS_LOG(EXCEPTION) << "Graph cycle exists, node " << next->DebugString(2);
MS_LOG(EXCEPTION) << "Graph cycle exists, strike node: " << next->DebugString(2);
});
} else if (incl > EXCLUDE) { // Not NOFOLLOW or EXCLUDE
MS_LOG(EXCEPTION) << "The result of include(node) must be one of: \"follow\", \"nofollow\", \"exclude\"";


Loading…
Cancel
Save