Skip to content

Commit

Permalink
fix dygraph grad to support high differential (#36059)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiabinYang authored Sep 26, 2021
1 parent ac72f97 commit e123b87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion paddle/fluid/imperative/partial_grad_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ static void GetGraphInfoBetweenTargets(
}

for (auto &pending_node : node->GradPendingNodes()) {
for (auto &pending_op : *pending_node) {
preceding_ops[&pending_op].insert(op);
}
if (visited.count(pending_node.get()) == 0) {
visited.insert(pending_node.get());
for (auto &pending_op : *pending_node) {
preceding_ops[&pending_op].insert(op);
q.emplace(&pending_op, pending_node.get());
}
}
Expand Down

0 comments on commit e123b87

Please sign in to comment.