未验证 提交 61f9f136 编写于 作者: K kangguangli 提交者: GitHub

[BugFix][ConditionalBlock] fix judgement about scope validation (#50086)

* fix judgement about scope validation

* fix ci bug: same address is not enough for data consistency

* remove useless check
上级 fe811625
......@@ -78,17 +78,8 @@ class ConditionalBlockOp : public ConditionalOp {
"got a null Scope variable. Please set the Scope variable."));
auto *scopes = scope_var->GetMutable<std::vector<framework::Scope *>>();
if (scopes->size() == 0 || !FLAGS_control_flow_use_new_executor) {
scopes->resize(1);
scopes->front() = &scope.NewScope();
}
// We need to know whether the scope we cached is still valid.
// If not, we need to create a new one.
if (scope.kids().size() == 0) {
scopes->front() = &scope.NewScope();
}
auto &cur_scope = *scopes->front();
#ifdef PADDLE_WITH_MKLDNN
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册