Browse Source

!5524 fix stream bug

Merge pull request !5524 from gukecai/stream-bug
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
6e463f29d3
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc

+ 2
- 3
mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc View File

@@ -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);



Loading…
Cancel
Save