fix abstract null and bug in checkcircle

pull/14068/head
lingyunli63 4 years ago
parent 4b329090b6
commit 8832248205

@ -73,6 +73,14 @@ bool CheckCircle(const std::set<AnfNodePtr> &fused_op_set, const AnfNodePtr &che
return edges;
};
// consider prior depend both in fused_op_set
auto range = depend_prior.equal_range(check_node);
for (auto iter = range.first; iter != range.second; ++iter) {
if (fused_op_set.count(iter->second.first)) {
circle_nodes->push_back(iter->second.first);
}
}
std::set<AnfNodePtr> cached_done_set;
auto cnode = check_node->cast<CNodePtr>();
const auto &inputs = InputEdges(cnode);

@ -286,7 +286,7 @@ class AreaGraph {
}
}
auto new_main_cnode = main_func_graph->NewCNode(main_cnode_inputs);
new_main_cnode->set_abstract(sub_func_graph->get_return()->abstract());
new_main_cnode->set_abstract(sub_func_graph->output()->abstract());
return new_main_cnode;
}
@ -639,7 +639,7 @@ class CostModelSplitSchemer : public Splitter::SplitSchemer {
need_inline_.clear();
return;
} else {
MS_LOG(INFO) << "CostModel split successed. The kernel is split to " << split_plan_.size() << " parts.";
MS_LOG(INFO) << "CostModel split succeeded. The kernel is split to " << split_plan_.size() << " parts.";
}
MapNodeGroup();
GroupReturnNode();
@ -740,7 +740,7 @@ bool GraphKernelSplitter::Run(const FuncGraphPtr &func_graph) {
auto todos = TopoSort(func_graph->get_return());
// Split subgraphs in reversed topo order,
// since the nodes behind the processing node may be modified when spliting.
// since the nodes behind the processing node may be modified when splitting.
bool changed = false;
for (auto iter = todos.crbegin(); iter != todos.crend(); ++iter) {
auto node = (*iter)->cast<CNodePtr>();

Loading…
Cancel
Save