Wait multiple stream

helinwang-patch-1
Yu Yang 7 years ago
parent c18c2f6ab0
commit d3c82c356e

@ -816,6 +816,10 @@ void ParallelExecutor::Run(const std::vector<std::string> &fetch_tensors,
// FIXME:
// It could be optimized by using multiple events in an operator.
// Manually sync computation during iter.
for (auto &s : member_->communication_streams_) {
s.second.ctx_->Wait();
}
for (auto &p : member_->places_) {
platform::DeviceContextPool::Instance().Get(p)->Wait();
}

Loading…
Cancel
Save