From 3295f31076bd0acc97b3bfc599bf88ccb8e20f9c Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Thu, 26 Apr 2018 14:43:34 +0800 Subject: [PATCH] optimize naming --- paddle/fluid/operators/listen_and_serv_op.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 4c0da18ba8e..57cff680ab8 100644 --- a/paddle/fluid/operators/listen_and_serv_op.cc +++ b/paddle/fluid/operators/listen_and_serv_op.cc @@ -233,9 +233,9 @@ void ListenAndServOp::RunAsyncLoop(framework::Executor *executor, auto optimize_prepared = executor->Prepare(*program, block_list); std::unordered_map> - grad_to_prepared_block; + grad_to_prepared_ctx; for (size_t i = 0; i < block_list.size(); ++i) { - grad_to_prepared_block[id_to_grad[block_list[i]]] = optimize_prepared[i]; + grad_to_prepared_ctx[id_to_grad[block_list[i]]] = optimize_prepared[i]; } VLOG(3) << "RunAsyncLoop into while"; @@ -254,7 +254,7 @@ void ListenAndServOp::RunAsyncLoop(framework::Executor *executor, LOG(ERROR) << "Can not find server side var: " << recv_var_name; PADDLE_THROW("Can not find server side var"); } - AsyncExecuteBlock(executor, grad_to_prepared_block[recv_var_name].get(), + AsyncExecuteBlock(executor, grad_to_prepared_ctx[recv_var_name].get(), v.second->GetMutableLocalScope()); } -- GitLab