提交 8a06ae02 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2506 bugfix(transform): relax the exception of control depend on value node

Merge pull request !2506 from xianwz/master
...@@ -1646,7 +1646,7 @@ bool DfGraphConvertor::GetControlDependList(const CNodePtr &node, ...@@ -1646,7 +1646,7 @@ bool DfGraphConvertor::GetControlDependList(const CNodePtr &node,
dst_ops_list->insert(dst_ops_list->end(), converted_list.begin(), converted_list.end()); dst_ops_list->insert(dst_ops_list->end(), converted_list.begin(), converted_list.end());
} }
if (src_ops_list->empty() || dst_ops_list->empty()) { if (src_ops_list->empty() || dst_ops_list->empty()) {
MS_LOG(WARNING) << "Control depend node's src or dest node is not a apply node, ignore it"; MS_LOG(DEBUG) << "Control depend node's src or dest node is not a CNode, ignore it";
error_ = SUCCESS; error_ = SUCCESS;
} }
return true; return true;
...@@ -1690,6 +1690,8 @@ void DfGraphConvertor::ConvertControlDependNode(const CNodePtr node) { ...@@ -1690,6 +1690,8 @@ void DfGraphConvertor::ConvertControlDependNode(const CNodePtr node) {
}); });
} else if (src_ops_list->size() == 1 && dst_ops_list->size() == 1) { } else if (src_ops_list->size() == 1 && dst_ops_list->size() == 1) {
control_edges.push_back({(*src_ops_list)[0], (*dst_ops_list)[0]}); control_edges.push_back({(*src_ops_list)[0], (*dst_ops_list)[0]});
} else if (src_ops_list->empty() || dst_ops_list->empty()) {
MS_LOG(DEBUG) << "Depend list of src or dst is empty, ignore it";
} else { } else {
MS_LOG(ERROR) << "Convert control depend node to operator failed, depend src:" << src_ops_list->size() MS_LOG(ERROR) << "Convert control depend node to operator failed, depend src:" << src_ops_list->size()
<< " -> dst:" << dst_ops_list->size(); << " -> dst:" << dst_ops_list->size();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册