From 20118068ffa84feca1d77a5abb7df9afc25eda53 Mon Sep 17 00:00:00 2001 From: jonyguo Date: Mon, 6 Feb 2023 17:43:49 +0800 Subject: [PATCH] fix: multi model.train with sink_mode=True maybe fail --- .../plugin/device/ascend/hal/device/ascend_data_queue.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_data_queue.cc b/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_data_queue.cc index 069a1256763..dcad621c6b9 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_data_queue.cc +++ b/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_data_queue.cc @@ -83,6 +83,10 @@ void AddHandle(acltdtChannelHandle **handle, std::thread *use_thread) { } g_acl_handle_map.emplace_back(void_handle, use_thread); + { + std::lock_guard lock(g_acl_destroy_all_mutex); + g_acl_destroy_all = false; + } } void DelHandle(acltdtChannelHandle **handle) {