From 1dd216dc3b7a293bcecda34da00ad1ef8ca6f192 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 20 Mar 2018 16:04:20 +0800 Subject: [PATCH] Wait bcast param --- paddle/fluid/framework/parallel_executor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 25f8d7afdec..66ad3f33d94 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -690,6 +690,10 @@ void ParallelExecutor::BCastParamsToGPUs( } platform::dynload::ncclGroupEnd(); } + + for (auto &stream : member_->communication_streams_) { + stream.second.ctx_->Wait(); + } } #else PADDLE_THROW("Not compiled with CUDA"); -- GitLab