Skip to content

Commit 71a2e6b

Browse files
committed
Reverse create var
1 parent 2e8459b commit 71a2e6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

paddle/fluid/framework/parallel_executor.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ void ParallelExecutor::Run(
163163
SplitTensorToPlaces(feed_tensors);
164164

165165
// Create local scopes.
166-
for (auto &scope : member_->local_scopes_) {
166+
for (auto it = member_->local_scopes_.rbegin();
167+
it != member_->local_scopes_.rend(); ++it) {
168+
auto &scope = *it;
167169
Scope &local_scope = scope->NewScope();
168170
*scope->Var(details::kLocalExecScopeName)->GetMutable<Scope *>() =
169171
&local_scope;

0 commit comments

Comments
 (0)