diff --git a/paddle/fluid/operators/distributed/communicator.cc b/paddle/fluid/operators/distributed/communicator.cc index fb9ecfa808167261da5cef4cc6e4950552634e1d..bc0a57f3446abed18204a42fd533013515876650 100644 --- a/paddle/fluid/operators/distributed/communicator.cc +++ b/paddle/fluid/operators/distributed/communicator.cc @@ -74,9 +74,9 @@ void Communicator::SendThread() { merged_var_num++; } MergeVars(var_name, vars, send_scope_.get()); - auto send_functor = distributed::ParameterSend(); - // send_functor(var_name, send_varname_to_ctx_[var_name], exe_ctx, - // send_scope_, true); + // auto send_functor = distributed::ParameterSend(); + // send_functor(var_name, send_varname_to_ctx_[var_name], exe_ctx, + // send_scope_, true); } } @@ -85,8 +85,8 @@ void Communicator::RecvThread() { for (auto &iter : recv_varname_to_ctx_) { auto &var_name = iter.first; VLOG(3) << "recv var " << iter.first; - auto recv_functor = distributed::ParameterRecv(); - // recv_functor(var_name, iter.second, exe_ctx, recv_scope_); + // auto recv_functor = distributed::ParameterRecv(); + // recv_functor(var_name, iter.second, exe_ctx, recv_scope_); } } diff --git a/paddle/fluid/operators/distributed_ops/recv_op.cc b/paddle/fluid/operators/distributed_ops/recv_op.cc index 41701d3a3e5a50e0ef011f62468d9d6912d0ef5b..680b484d413207595369dc665a1c64f115e4ae4b 100644 --- a/paddle/fluid/operators/distributed_ops/recv_op.cc +++ b/paddle/fluid/operators/distributed_ops/recv_op.cc @@ -54,12 +54,6 @@ class RecvOp : public framework::OperatorBase { Attr>("recv_varnames"); if (recv_varnames.size() > 0) { - framework::RuntimeContext ctx(Inputs(), Outputs(), scope); - platform::DeviceContextPool &pool = - platform::DeviceContextPool::Instance(); - auto *dev_ctx = pool.Get(place); - auto exe_ctx = - framework::ExecutionContext(*this, scope, *dev_ctx, ctx, nullptr); auto recv_functor = distributed::ParameterRecv(); auto rpc_ctx = distributed::RpcContext(outs[0], recv_varnames, epmap, {}); recv_functor(rpc_ctx, scope); diff --git a/paddle/fluid/operators/distributed_ops/send_op.cc b/paddle/fluid/operators/distributed_ops/send_op.cc index 5585ad21cea67751ceb6e1e26369fb8ad0ac967a..8b09cf86d7d5f99944906ede5f801e4840eeca42 100644 --- a/paddle/fluid/operators/distributed_ops/send_op.cc +++ b/paddle/fluid/operators/distributed_ops/send_op.cc @@ -47,12 +47,6 @@ class SendOp : public framework::OperatorBase { if (send_varnames.size() > 0) { PADDLE_ENFORCE_EQ(ins.size(), 1, ""); - framework::RuntimeContext ctx(Inputs(), Outputs(), scope); - platform::DeviceContextPool& pool = - platform::DeviceContextPool::Instance(); - auto* dev_ctx = pool.Get(place); - auto exe_ctx = - framework::ExecutionContext(*this, scope, *dev_ctx, ctx, nullptr); auto send_functor = distributed::ParameterSend(); auto rpc_ctx = distributed::RpcContext(ins[0], send_varnames, epmap, height_sections);