Skip to content

Commit 66be532

Browse files
authored
Merge pull request #12592 from JiayiFeng/fix_mac_compile_error
fix mac compile error
2 parents cb79b02 + 8e604a1 commit 66be532

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

paddle/fluid/operators/parallel_do_op.cc

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,11 @@ class ParallelDoOp : public framework::OperatorBase {
163163
auto &place = places[place_idx];
164164
auto *cur_scope = sub_scopes[place_idx];
165165

166-
workers.emplace_back(
167-
framework::Async([program, cur_scope, place, block, place_idx] {
168-
framework::Executor executor(place);
169-
executor.Run(*program, cur_scope, block->ID(),
170-
false /*create_local_scope*/);
171-
}));
166+
workers.emplace_back(framework::Async([program, cur_scope, place, block] {
167+
framework::Executor executor(place);
168+
executor.Run(*program, cur_scope, block->ID(),
169+
false /*create_local_scope*/);
170+
}));
172171
}
173172
for (auto &worker : workers) {
174173
worker.wait();
@@ -239,12 +238,11 @@ class ParallelDoGradOp : public framework::OperatorBase {
239238
auto *cur_scope = sub_scopes[i];
240239

241240
// execute
242-
workers.emplace_back(
243-
framework::Async([program, cur_scope, place, block, i] {
244-
framework::Executor executor(place);
245-
executor.Run(*program, cur_scope, block->ID(),
246-
false /*create_local_scope*/);
247-
}));
241+
workers.emplace_back(framework::Async([program, cur_scope, place, block] {
242+
framework::Executor executor(place);
243+
executor.Run(*program, cur_scope, block->ID(),
244+
false /*create_local_scope*/);
245+
}));
248246
}
249247
for (auto &worker : workers) {
250248
worker.wait();

0 commit comments

Comments
 (0)