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

add fake rpc to send

上级 43378ad6
......@@ -191,6 +191,7 @@ void Communicator::RecvThread() {
void Communicator::Send(const std::string &var_name,
const framework::Scope &scope) {
if (!FLAGS_communicator_fake_rpc) {
VLOG(3) << "communicator send " << var_name;
// push var into send queue by var_name
auto *grad_var = scope.FindVar(var_name);
......@@ -200,6 +201,7 @@ void Communicator::Send(const std::string &var_name,
auto &queue = send_varname_to_queue_.at(var_name);
VLOG(3) << "send " << var_name << " queue size " << queue->Size();
queue->Push(tmp_grad_var);
}
}
Communicator *Communicator::GetInstance() { return communicator_.get(); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册