Browse Source

!1524 bugfix for nopadding ref

From: @ni100die
Reviewed-by: @sheng-nan,@ji_chen
Signed-off-by: @ji_chen
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
06e51ada51
2 changed files with 7 additions and 1 deletions
  1. +6
    -0
      ge/graph/build/memory/graph_mem_assigner.cc
  2. +1
    -1
      metadef

+ 6
- 0
ge/graph/build/memory/graph_mem_assigner.cc View File

@@ -1700,6 +1700,12 @@ void GraphMemoryAssigner::PrintMemoryOffset() {
ge::Status GraphMemoryAssigner::TryGetNodeRefIndexes(const NodePtr &node, map<int32_t, int32_t> &out2ins) const{
for (const auto &out_data_anchor : node->GetAllOutDataAnchors()) {
int32_t reuse_in_index = -1;
// nopadding means output[0] reuse input[0], but as history reason,
// other output index also return true for mem assign in block_mem_assigner
if (GraphUtils::IsNoPaddingRefFromInput(out_data_anchor, reuse_in_index)) {
out2ins.emplace(out_data_anchor->GetIdx(), reuse_in_index);
return ge::SUCCESS;
}
bool reuse_input_flag = GraphUtils::IsRefFromInput(out_data_anchor, reuse_in_index);
if (reuse_input_flag) {
if (node->GetInDataAnchor(reuse_in_index) != nullptr) {


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 72bcde72074856e6cb1e8ba19df43b358bdb0160
Subproject commit 72984c62e434da09f8ea7d7a4fd4a365e0b6f42c

Loading…
Cancel
Save