diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 4c0da18ba8ecd65aa2c6e1bcd61586c7e00b6351..57cff680ab89f2df7e71af4056ee06cdf330bbab 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()); }