提交 93464b25 编写于 作者: Q Qiao Longfei

update async_sparse_param_update_recorder

上级 542b52fa
...@@ -120,9 +120,13 @@ class AsyncSparseParamUpdateRecorder { ...@@ -120,9 +120,13 @@ class AsyncSparseParamUpdateRecorder {
auto& param_name = grad_to_param_.at(grad_name); auto& param_name = grad_to_param_.at(grad_name);
auto& trainer_to_rows = param_to_updated_rows_.at(param_name); auto& trainer_to_rows = param_to_updated_rows_.at(param_name);
std::vector<std::future<void>> fs;
for (auto& set : trainer_to_rows) { for (auto& set : trainer_to_rows) {
fs.push_back(set->Update(update_rows));
}
for (auto& f : fs) {
// no need to wait here because GetAndClear will wait. // no need to wait here because GetAndClear will wait.
set->Update(update_rows); // f.wait();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册