提交 6ad6b47a 编写于 作者: S seiriosPlus

fix parame recv for sparse

上级 79c6001a
......@@ -628,9 +628,7 @@ void GeoCommunicator::RecvByCommunicator() {
if (recv_ctx.is_sparse) {
RecvSparse(var_name);
} else {
VLOG(1) << "recv dense " << var_name << " begin";
RecvDense(var_name);
VLOG(1) << "recv dense " << var_name << " done";
}
};
tasks.emplace_back(send_threadpool_->enqueue(std::move(recv_task)));
......
......@@ -84,9 +84,14 @@ void RecvSelectedRows(const CommContext &rpc_ctx,
ids_num += recv_t.rows().size();
width = recv_t.value().dims()[1];
std::transform(recv_t.rows().begin(), recv_t.rows().end(),
std::back_inserter(all_ids),
[&](int64_t id) { return id * pserver_num + i; });
if (rpc_ctx.is_distributed) {
std::copy(recv_t.rows().begin(), recv_t.rows().end(),
std::back_inserter(all_ids));
} else {
std::transform(recv_t.rows().begin(), recv_t.rows().end(),
std::back_inserter(all_ids),
[&](int64_t id) { return i * pserver_num + id; });
}
}
auto *var = scope.FindVar(rpc_ctx.var_name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册