未验证 提交 43752047 编写于 作者: C chengduo 提交者: GitHub

fix DropLocalExeScopes (#17829)

test=develop
上级 50326563
......@@ -65,12 +65,15 @@ void ScopeBufferedSSAGraphExecutor::DropLocalExeScopes() {
for (auto p : places_) {
platform::DeviceContextPool::Instance().Get(p)->Wait();
}
for (auto &scope : local_scopes_) {
auto &local_scope =
*scope->Var(details::kLocalExecScopeName)->GetMutable<Scope *>();
auto *local_scope_var = scope->FindLocalVar(details::kLocalExecScopeName);
if (local_scope_var != nullptr) {
auto &local_scope = *local_scope_var->GetMutable<Scope *>();
scope->DeleteScope(local_scope);
VLOG(3) << "Drop local execution scope: " << local_scope;
}
}
}
void ScopeBufferedSSAGraphExecutor::PrepareLocalExeScopes() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册