From 4137bb4eda7692b06b986ed7ede8f09ec2f28fb0 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 20 Mar 2018 12:28:40 +0800 Subject: [PATCH] Add wait --- paddle/fluid/framework/parallel_executor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 1847a4dfa5..d3122353af 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -813,7 +813,7 @@ void ParallelExecutor::Run(const std::vector &fetch_tensors, fetch_ops.clear(); *member_->global_scope_->Var(fetched_var_name)->GetMutable() = fetched_data->tensors_; - + VLOG(3) << "Before Wait"; // FIXME: // It could be optimized by using multiple events in an operator. // Manually sync computation during iter. @@ -824,6 +824,7 @@ void ParallelExecutor::Run(const std::vector &fetch_tensors, for (auto &p : member_->places_) { platform::DeviceContextPool::Instance().Get(p)->Wait(); } + VLOG(3) << "Done wait"; } void ParallelExecutor::RunOp( -- GitLab