From 3815051ee3e3dea8c4653f07efdc4ebf602572c1 Mon Sep 17 00:00:00 2001 From: hwjiaorui Date: Thu, 29 Jul 2021 21:39:55 +0800 Subject: [PATCH] fix independ event insertion --- .../ccsrc/runtime/device/ascend/ascend_stream_assign.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc b/mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc index 436c17fa5ea..c9f3f6932f7 100644 --- a/mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc +++ b/mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc @@ -1641,11 +1641,11 @@ void AscendStreamAssign::InsertEventForIndependentParallel(const NotNullDebugString() << "]"; CNodePtr send_cnode_ptr = CreateSendApplyKernel(graph_ptr, cur_event_id, AnfAlgo::GetStreamId(*it)); - auto target = FindTargetOp(it, cnodes.end(), *(it - 1), false); + auto target = FindTargetOp(it + 1, cnodes.end(), *it, false); if (target == cnodes.end()) { - it++; - MS_LOG(DEBUG) << "Independent node[" << (*(it - 1))->fullname_with_scope() + MS_LOG(DEBUG) << "Independent node[" << (*it)->fullname_with_scope() << "] can't find target for insert recv op, no insert send/recv"; + it++; continue; }