From 110a1a986a043702c2d2b20b8ca2e29394de4550 Mon Sep 17 00:00:00 2001 From: chengduo Date: Mon, 2 Jul 2018 09:11:55 +0800 Subject: [PATCH] fix FeedAndSplitTensorIntoLocalScopes (#11817) (#11852) --- 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 b53a6f43f..751b10eee 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