提交 6e463f29 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!5524 fix stream bug

Merge pull request !5524 from gukecai/stream-bug
......@@ -736,10 +736,9 @@ void AscendStreamAssign::InsertEventCommonDependHcom(const NotNull<KernelGraphPt
vector<CNodePtr> cnodes = cnode_ptr_list;
uint32_t cur_event_id = resource_manager.ApplyNewEvent();
auto it = cnodes.begin();
while (it != cnodes.end() && (it + 1) != cnodes.end()) {
while (it != cnodes.end()) {
MS_EXCEPTION_IF_NULL(*it);
MS_EXCEPTION_IF_NULL(*(it + 1));
if (IsHcom(*it) && !IsHcom(*(it + 1))) {
if (IsHcom(*it)) {
CNodePtr send_cnode_ptr = CreateSendApplyKernel(graph_ptr, cur_event_id, AnfAlgo::GetStreamId(*it));
it = cnodes.insert(it + 1, send_cnode_ptr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册