From f4cffbb26cf5a7afff15ff53e03dec34400c17fc Mon Sep 17 00:00:00 2001 From: liyiqi Date: Thu, 15 Sep 2022 20:35:51 +0800 Subject: [PATCH] bug fix --- .../device/ascend/hal/device/ascend_stream_assign.cc | 7 ++++++- .../ascend/hal/hardware/ascend_graph_optimization.cc | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_stream_assign.cc b/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_stream_assign.cc index 4333b458791..eda004f8e0c 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_stream_assign.cc +++ b/mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_stream_assign.cc @@ -1916,6 +1916,11 @@ void AscendStreamAssign::InsertEventHcomDependHcomAtSameGroup( } void AscendStreamAssign::InsertEventForCallCommSubGraph(const NotNull &graph_ptr) const { + if (comm_sub_graph_stream_.empty()) { + MS_LOG(INFO) << "No comm sub graph, skip."; + return; + } + std::map comm_sub_graph_id_to_group = {}; // key: label id, value: hcom group const auto &cnode_list = graph_ptr->execution_order(); for (const auto &n : cnode_list) { @@ -1948,7 +1953,7 @@ void AscendStreamAssign::InsertEventForCallCommSubGraph(const NotNull::const_iterator label_iter = comm_sub_graph_id_to_group.find(label_id); if (label_iter == comm_sub_graph_id_to_group.cend()) { - MS_LOG(WARNING) << "Cannot find comm group for sub comm graph label id " << label_id; + MS_LOG(INFO) << "Cannot find comm group for sub comm graph label id " << label_id; new_order.push_back(n); continue; } diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_graph_optimization.cc b/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_graph_optimization.cc index 9a25d275c56..4b97fdb71a4 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_graph_optimization.cc +++ b/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_graph_optimization.cc @@ -261,6 +261,10 @@ void AscendGraphOptimization::RootGraphExecutorValidate(const NotNullgraph_id(); SetOperatorInfo(graph); MS_LOG(INFO) << "Status record: end select kernel info. graph id: " << graph->graph_id();