diff --git a/ge/graph/build/memory/graph_mem_assigner.cc b/ge/graph/build/memory/graph_mem_assigner.cc index c3721554..872958cd 100755 --- a/ge/graph/build/memory/graph_mem_assigner.cc +++ b/ge/graph/build/memory/graph_mem_assigner.cc @@ -1700,6 +1700,12 @@ void GraphMemoryAssigner::PrintMemoryOffset() { ge::Status GraphMemoryAssigner::TryGetNodeRefIndexes(const NodePtr &node, map &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) { diff --git a/metadef b/metadef index 72bcde72..72984c62 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 72bcde72074856e6cb1e8ba19df43b358bdb0160 +Subproject commit 72984c62e434da09f8ea7d7a4fd4a365e0b6f42c