diff --git a/paddle/fluid/operators/distributed/async_sparse_param_update_recorder.h b/paddle/fluid/operators/distributed/async_sparse_param_update_recorder.h index 0b9351a67635ed2bf49eeb60b5348fd1a4f62ade..eadd842c7f6ead56006fd0c34814b1b7bd9b62f4 100644 --- a/paddle/fluid/operators/distributed/async_sparse_param_update_recorder.h +++ b/paddle/fluid/operators/distributed/async_sparse_param_update_recorder.h @@ -57,8 +57,6 @@ class ConcurrentSet { std::future GetAndClear(std::vector* 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(); } } diff --git a/paddle/fluid/operators/distributed/parameter_recv.cc b/paddle/fluid/operators/distributed/parameter_recv.cc index e9d34b173942b1ae27be3515cd9862f0b5984af0..a387ee5ee193122dcd4e3f42eafbbd078bca4b8d 100644 --- a/paddle/fluid/operators/distributed/parameter_recv.cc +++ b/paddle/fluid/operators/distributed/parameter_recv.cc @@ -109,8 +109,7 @@ void ParameterRecv::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() + row_id * width,