未验证 提交 e683ab50 编写于 作者: X xiongkun 提交者: GitHub

[New-Exe]Fix word2vec hang proble using InterpreterCore (#38584)

* fix wait for tiexing

* fix work2vec model. new_exe support EOF Exception in ReadOp now
上级 1c094d3e
...@@ -454,11 +454,20 @@ void InterpreterCore::ExecuteInstructionList( ...@@ -454,11 +454,20 @@ void InterpreterCore::ExecuteInstructionList(
} }
auto event_name = main_thread_blocker_.WaitEvent(); auto event_name = main_thread_blocker_.WaitEvent();
VLOG(3) << "event_name: " << event_name; VLOG(1) << "event_name: " << event_name;
if (UNLIKELY(exception_holder_.IsCaught())) { if (UNLIKELY(exception_holder_.IsCaught())) {
VLOG(4) << "Exception caught " << exception_holder_.Type(); VLOG(1) << "Exception caught " << exception_holder_.Type();
// NOTE(xiongkun) Why we reset ?
// The caught exception may be EOFExcetion, under this situation, we need
// make async_work_queue_ available, so we need reset.
async_work_queue_->Cancel(); async_work_queue_->Cancel();
async_work_queue_.reset(new interpreter::AsyncWorkQueue(
kHostNumThreads, &main_thread_blocker_));
PADDLE_ENFORCE_EQ(
main_thread_blocker_.Clear(), 0,
platform::errors::PreconditionNotMet(
"main_thread_blocker_.Clear() return -1, clear failed"));
exception_holder_.ReThrow(); exception_holder_.ReThrow();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册