Browse Source

Fix issue #I3AAF8: Hang up while training lenet

tags/v1.3.0
zhangzhaoju chujinjin 5 years ago
parent
commit
53b072e883
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/ccsrc/backend/session/executor.cc

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

@@ -290,10 +290,10 @@ void Executor::RunTask(const std::shared_ptr<Task> &task, bool sync, bool long_r
task_cond_var_.notify_all();
if (sync && !sync_run_task_finished_) {
std::unique_lock<std::mutex> lock(task_mutex_);
if (long_run) {
if (sync && long_run) {
mindspore::ScopedLongRunning long_running;
sync_cond_var_.wait(lock, [this] { return sync_run_task_finished_; });
} else {
} else if (sync) {
sync_cond_var_.wait(lock, [this] { return sync_run_task_finished_; });
}
}


Loading…
Cancel
Save