forked from mindspore-Ecosystem/mindspore
fix bug of print scalar, not optimize depend when specializing
This commit is contained in:
parent
0ca626ef6c
commit
5138c10c6c
|
@ -648,9 +648,12 @@ AnfNodePtr FuncGraphSpecializer::BuildPossibleValueNode(const AnfNodePtr &origin
|
||||||
ValuePtr val = ival->BuildValue();
|
ValuePtr val = ival->BuildValue();
|
||||||
if (val->isa<AnyValue>()) {
|
if (val->isa<AnyValue>()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else {
|
|
||||||
return BuildValueNode(val, ival);
|
|
||||||
}
|
}
|
||||||
|
// keep primitive 'depend' not to be optimized
|
||||||
|
if (IsPrimitiveCNode(origin_node, prim::kPrimDepend)) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return BuildValueNode(val, ival);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue