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

fix bug

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