From 692a0f7425064f5e44179be6daf49062d50ffc2a Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 14 Mar 2018 21:17:42 +0800 Subject: [PATCH] Better name --- paddle/fluid/framework/parallel_executor.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 7488458743..46fb15f580 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -27,7 +27,8 @@ struct VarHandle { platform::Place place_; OpHandle *generated_op_; - std::vector deps_ops_; + + std::vector pending_ops_; }; struct OpHandle { @@ -141,7 +142,7 @@ void ParallelExecutor::ConstructDependencyGraph( auto &place = pair.first; VarHandle *var = GetVarHandle(each_var_name, place); op_handle->inputs_.emplace_back(var); - var->deps_ops_.emplace_back(op_handle); + var->pending_ops_.emplace_back(op_handle); } var_names = op->OutputArgumentNames(); @@ -158,7 +159,7 @@ void ParallelExecutor::ConstructDependencyGraph( op_handle = member_->ops_.back().get(); auto &place = pair.first; VarHandle *loss = GetVarHandle(loss_var_name, place); - loss->deps_ops_.emplace_back(op_handle); + loss->pending_ops_.emplace_back(op_handle); op_handle->inputs_.emplace_back(loss); GenerateVar(op_handle, loss_var_name + "@GRAD", place); change_forward = true; @@ -188,7 +189,7 @@ void ParallelExecutor::ConstructDependencyGraph( } auto *prev_grad = &vars[vars.size() - 1]; op_handle->inputs_.emplace_back(prev_grad); - prev_grad->deps_ops_.emplace_back(op_handle); + prev_grad->pending_ops_.emplace_back(op_handle); auto &var = vars[vars.size()]; var.place_ = place; var.generated_op_ = op_handle; @@ -317,7 +318,7 @@ std::vector ParallelExecutor::Run( std::vector to_run; for (auto *var : to_remove) { - for (auto *op : var->deps_ops_) { + for (auto *op : var->pending_ops_) { if (var->name_ == "mean_0.tmp_0@GRAD") { LOG(INFO) << op->DebugString(); } -- GitLab