From 404d157f23c7dbee939a97aad37bc3944e73538c Mon Sep 17 00:00:00 2001 From: huanghui Date: Wed, 28 Apr 2021 15:52:34 +0800 Subject: [PATCH] clear done tasks before sync run task --- mindspore/ccsrc/backend/session/executor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/ccsrc/backend/session/executor.cc b/mindspore/ccsrc/backend/session/executor.cc index cb7cf3777e..202410b143 100644 --- a/mindspore/ccsrc/backend/session/executor.cc +++ b/mindspore/ccsrc/backend/session/executor.cc @@ -279,6 +279,9 @@ void Executor::ClearDoneTasks() { } void Executor::RunTask(const std::shared_ptr &task, bool sync, bool long_run) { + if (sync) { + ClearDoneTasks(); + } { std::lock_guard lock(task_mutex_); sync_run_task_finished_ = false;