From 6711b7b5f174df83a0b06e24167509a15ae1a0bd Mon Sep 17 00:00:00 2001 From: chengduo Date: Thu, 28 Jun 2018 22:46:51 +0800 Subject: [PATCH] fix FeedAndSplitTensorIntoLocalScopes (#11817) --- paddle/fluid/framework/parallel_executor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index b53a6f43fb..751b10eeee 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -253,6 +253,9 @@ void ParallelExecutor::FeedAndSplitTensorIntoLocalScopes( t->set_lod(lod_tensors[j].lod()); } } + for (auto &p : member_->places_) { + platform::DeviceContextPool::Instance().Get(p)->Wait(); + } } ParallelExecutor::~ParallelExecutor() { -- GitLab