From 5a02739ce9c564c728e4631c731137cd0eb99bf7 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 27 Mar 2018 13:41:42 +0800 Subject: [PATCH] Throw error --- .../fluid/framework/details/threaded_ssa_graph_executor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc b/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc index d9b855503b4..501e1dfad76 100644 --- a/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc +++ b/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc @@ -208,6 +208,11 @@ void ThreadedSSAGraphExecutor::RunOp( try { VLOG(10) << op->DebugString(); op->Run(use_event_); + + for (auto &dev_ctx : op->dev_ctx_) { + dev_ctx.second->Wait(); // Sync error + } + for (auto *ready : *ready_buffer) { ready->store(true, std::memory_order_release); } -- GitLab