提交 63acbe7a 编写于 作者: Q Qiao Longfei

fix bug

上级 0ff1e64f
......@@ -57,8 +57,6 @@ class ConcurrentSet {
std::future<void> GetAndClear(std::vector<int64_t>* result) {
auto task = [this, &result] {
result->clear();
// FIXME(qiao): use a trick to avoid the bug of recv an selected rows
result->push_back(0);
for (auto& id : set_) {
result->push_back(id);
}
......@@ -125,8 +123,7 @@ class AsyncSparseParamUpdateRecorder {
fs.push_back(set->Update(update_rows));
}
for (auto& f : fs) {
// no need to wait here because GetAndClear will wait.
// f.wait();
f.wait();
}
}
......
......@@ -109,8 +109,7 @@ void ParameterRecv<T>::operator()(const RpcContext &rpc_ctx,
<< sstream.str();
}
// FIXME(qiao): use a trick to avoid the bug of recv an selected rows
for (auto i = 1; i < recv_slr.rows().size(); ++i) {
for (auto i = 0; i < recv_slr.rows().size(); ++i) {
auto row_id = recv_slr.rows()[i] + row_offset;
PADDLE_ENFORCE_LT(row_id, recv_dims[0]);
memcpy(recv_tensor->data<T>() + row_id * width,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册