未验证 提交 3c2cafbe 编写于 作者: Y Yang Yang(Tony) 提交者: GitHub

fix parallel do hard coded empty var name (#8469)

上级 633756ad
...@@ -256,7 +256,7 @@ class ParallelDoGradOp : public framework::OperatorBase { ...@@ -256,7 +256,7 @@ class ParallelDoGradOp : public framework::OperatorBase {
} }
} }
for (auto &s : Outputs(framework::GradVarName(kParameters))) { for (auto &s : Outputs(framework::GradVarName(kParameters))) {
if (s == "@EMPTY@") { if (s == framework::kEmptyVarName) {
continue; continue;
} }
VLOG(3) << "Moving " << s; VLOG(3) << "Moving " << s;
...@@ -270,7 +270,7 @@ class ParallelDoGradOp : public framework::OperatorBase { ...@@ -270,7 +270,7 @@ class ParallelDoGradOp : public framework::OperatorBase {
const std::vector<framework::Scope *> &sub_scopes, const std::vector<framework::Scope *> &sub_scopes,
const platform::PlaceList &places) const { const platform::PlaceList &places) const {
for (auto &s : Outputs(framework::GradVarName(kParameters))) { for (auto &s : Outputs(framework::GradVarName(kParameters))) {
if (s == "@EMPTY@") { if (s == framework::kEmptyVarName) {
continue; continue;
} }
VLOG(3) << "Accumulating " << s; VLOG(3) << "Accumulating " << s;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册