未验证 提交 2f642159 编写于 作者: L liutiexing 提交者: GitHub

[NewExe] Ignore eof Exception(#39487)

* add align for WorkQueue

* add spinlock

* merge develop

* merge

* Add EventsWaiter

* Revert "Add EventsWaiter"

This reverts commit e206173aa9be7401b83a53581627bfaf557c8fb2.

* add log for Executor

* Avoid thread reconsruction when EOF
Co-authored-by: Nliutiexing <liutiexing@google.com>
上级 55da9344
......@@ -475,12 +475,11 @@ void InterpreterCore::ExecuteInstructionList(
if (UNLIKELY(exception_holder_.IsCaught())) {
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_.reset(new interpreter::AsyncWorkQueue(
kHostNumThreads, &main_thread_blocker_));
// Graceful exit when the executor encountered a fatal error.
// EOF is not a fatal error.
if (exception_holder_.Type() != "EOF") {
async_work_queue_->Cancel();
}
PADDLE_ENFORCE_EQ(
main_thread_blocker_.Clear(), 0,
platform::errors::PreconditionNotMet(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册