Browse Source

reset exception listener

tags/v1.2.0-rc1
kswang 5 years ago
parent
commit
51d6dbdffe
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      mindspore/ccsrc/backend/session/executor.cc
  2. +1
    -0
      mindspore/core/ir/tensor.h

+ 1
- 0
mindspore/ccsrc/backend/session/executor.cc View File

@@ -292,6 +292,7 @@ void Executor::RunTask(const std::shared_ptr<Task> &task, bool sync) {
return finished;
});
}
ClearDoneTasks();
MsException::Instance().CheckException();
}



+ 1
- 0
mindspore/core/ir/tensor.h View File

@@ -89,6 +89,7 @@ class WaitEvent : public ExceptionListener {
}
MsException::Instance().SetExceptionListener(const_cast<WaitEvent *>(this));
cond_var_.wait(lock, [this] { return !need_wait_; });
MsException::Instance().SetExceptionListener(nullptr);
MsException::Instance().CheckException();
}



Loading…
Cancel
Save