mixed_precision_init
Qiao Longfei 6 years ago
parent 0ff1e64fab
commit 63acbe7a65

@ -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,

Loading…
Cancel
Save