forked from mindspore-Ecosystem/mindspore
!13549 make IncorporateGetItemSwtich pass possible if there is env_setitem/env_getitem in that funcgraph
From: @xychow Reviewed-by: @zh_qh,@ginfung Signed-off-by: @zh_qh
This commit is contained in:
commit
aede003317
|
@ -362,7 +362,8 @@ class IncorporateGetitemSwitch : public AnfVisitor {
|
|||
is_in_get_ = false;
|
||||
|
||||
auto fg = node->func_graph();
|
||||
if (idx_ == -1 || switch_ == nullptr || fg == nullptr || fg->has_flag(FUNC_GRAPH_FLAG_DEFER_INLINE)) {
|
||||
if (idx_ == -1 || switch_ == nullptr || fg == nullptr ||
|
||||
(fg->has_flag(FUNC_GRAPH_FLAG_DEFER_INLINE) && !ExistEnvNode(fg))) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue