Skip to content

Commit 3c2cafb

Browse files
author
Yang Yang(Tony)
authored
fix parallel do hard coded empty var name (#8469)
1 parent 633756a commit 3c2cafb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/operators/parallel_do_op.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class ParallelDoGradOp : public framework::OperatorBase {
256256
}
257257
}
258258
for (auto &s : Outputs(framework::GradVarName(kParameters))) {
259-
if (s == "@EMPTY@") {
259+
if (s == framework::kEmptyVarName) {
260260
continue;
261261
}
262262
VLOG(3) << "Moving " << s;
@@ -270,7 +270,7 @@ class ParallelDoGradOp : public framework::OperatorBase {
270270
const std::vector<framework::Scope *> &sub_scopes,
271271
const platform::PlaceList &places) const {
272272
for (auto &s : Outputs(framework::GradVarName(kParameters))) {
273-
if (s == "@EMPTY@") {
273+
if (s == framework::kEmptyVarName) {
274274
continue;
275275
}
276276
VLOG(3) << "Accumulating " << s;

0 commit comments

Comments
 (0)