Browse Source

!7769 fix stream for memreuse

Merge pull request !7769 from gukecai/bug
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
4c9f75d13c
1 changed files with 23 additions and 2 deletions
  1. +23
    -2
      mindspore/ccsrc/runtime/device/ascend/ascend_stream_assign.cc

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

@@ -1634,8 +1634,18 @@ StreamActiveKind AscendStreamAssign::GetStreamActiveKind(const NotNull<KernelGra
if (name == kSendOpName || name == kRecvOpName) { if (name == kSendOpName || name == kRecvOpName) {
continue; continue;
} }
auto stream = AnfAlgo::GetStreamId(cnode);
auto it = hcom_stream_map_.find(stream);
if (it != hcom_stream_map_.end()) {
continue;
}

it = independent_stream_map_.find(stream);
if (it != independent_stream_map_.end()) {
continue;
}


pre_stream_id = AnfAlgo::GetStreamId(cnode);
pre_stream_id = stream;
break; break;
} }


@@ -1645,7 +1655,18 @@ StreamActiveKind AscendStreamAssign::GetStreamActiveKind(const NotNull<KernelGra
continue; continue;
} }


next_stream_id = AnfAlgo::GetStreamId(cnode);
auto stream = AnfAlgo::GetStreamId(cnode);
auto it = hcom_stream_map_.find(stream);
if (it != hcom_stream_map_.end()) {
continue;
}

it = independent_stream_map_.find(stream);
if (it != independent_stream_map_.end()) {
continue;
}

next_stream_id = stream;
break; break;
} }




Loading…
Cancel
Save