forked from mindspore-Ecosystem/mindspore
if parameter is the second input of control depend and depend mode is 0,this control relation is invalid
This commit is contained in:
parent
2daa1b33c2
commit
92aaf297c4
|
@ -548,8 +548,8 @@ void KernelGraph::UpdateControlDependRelations(const std::vector<AnfNodePtr> &de
|
|||
if (prior_node->isa<Parameter>() && depend_mode == 1) {
|
||||
prior_nodes = GetOutputNodes(prior_node);
|
||||
}
|
||||
if (depend_node->isa<Parameter>() && depend_mode == 1) {
|
||||
depend_nodes = GetOutputNodes(depend_node);
|
||||
if (depend_node->isa<Parameter>()) {
|
||||
depend_nodes = depend_mode == 1 ? GetOutputNodes(depend_node) : std::vector<AnfNodePtr>();
|
||||
}
|
||||
for (auto &first_node : prior_nodes) {
|
||||
if (AnfAlgo::CheckPrimitiveType(first_node, prim::kPrimControlDepend)) {
|
||||
|
|
Loading…
Reference in New Issue