提交 b542639d 编写于 作者: Q Qiao Longfei

code clean test=develop

上级 392e97aa
......@@ -80,33 +80,6 @@ void ProcessGraph(std::vector<ir::Graph *> graphs, Scope *scope) {
}
}
}
/*
VLOG(3) << "delete all recv ops";
for (auto *node : nodes_to_delete) {
// delete input edge
for (auto *in : node->inputs) {
auto &in_outs = in->outputs;
for (auto iter = in_outs.begin(); iter != in_outs.end();) {
if (*iter == node) {
VLOG(3) << "delete input edge from " << in->Name() << " for "
<< node->Name();
iter = in_outs.erase(iter);
} else {
++iter;
}
}
}
// delete output edge
for (auto *out : node->outputs) {
PADDLE_ENFORCE_EQ(out->outputs.size(), 0, "%s should have no outputs",
out->Name());
VLOG(3) << "delete output edge to " << out->Name();
graphs[i]->RemoveNode(out);
}
VLOG(3) << "delete node " << node->Name();
graphs[i]->RemoveNode(node);
}
*/
}
// init communicator here
if (send_varname_to_ctx.size() > 0) {
......
......@@ -48,15 +48,14 @@ class SendOp : public framework::OperatorBase {
if (send_varnames.size() > 0) {
PADDLE_ENFORCE_EQ(ins.size(), 1, "");
/*
if (distributed::Communicator::GetInstance() == nullptr) {
auto send_functor = distributed::ParameterSend<float>();
auto rpc_ctx = distributed::RpcContext(ins[0], send_varnames, epmap,
height_sections);
send_functor(rpc_ctx, scope, static_cast<bool>(sync_send));
*/
VLOG(3) << "send " << ins[0];
} else {
distributed::Communicator::GetInstance()->Send(ins[0], scope);
VLOG(3) << "send " << ins[0] << " done";
}
} else {
platform::DeviceContextPool& pool =
platform::DeviceContextPool::Instance();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册