From 93464b25ac13f0e19ba8aecf59ec8b9b0e3d7a66 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Mon, 25 Mar 2019 11:10:30 +0800 Subject: [PATCH] update async_sparse_param_update_recorder --- .../distributed/async_sparse_param_update_recorder.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 49e7c07e5d3..0b9351a6763 100644 --- a/paddle/fluid/operators/distributed/async_sparse_param_update_recorder.h +++ b/paddle/fluid/operators/distributed/async_sparse_param_update_recorder.h @@ -120,9 +120,13 @@ class AsyncSparseParamUpdateRecorder { auto& param_name = grad_to_param_.at(grad_name); auto& trainer_to_rows = param_to_updated_rows_.at(param_name); + std::vector> fs; 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. - set->Update(update_rows); + // f.wait(); } } -- GitLab