From f4d8ba5d3892f72ecd7c027ce3e4aa2846fe1dd2 Mon Sep 17 00:00:00 2001 From: "gengchao4@huawei.com" Date: Wed, 14 Apr 2021 20:01:20 +0800 Subject: [PATCH] bugfix for nopadding ref --- ge/graph/build/memory/graph_mem_assigner.cc | 2 ++ metadef | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ge/graph/build/memory/graph_mem_assigner.cc b/ge/graph/build/memory/graph_mem_assigner.cc index 119904ab..872958cd 100755 --- a/ge/graph/build/memory/graph_mem_assigner.cc +++ b/ge/graph/build/memory/graph_mem_assigner.cc @@ -1700,6 +1700,8 @@ 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; diff --git a/metadef b/metadef index 72bcde72..72984c62 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 72bcde72074856e6cb1e8ba19df43b358bdb0160 +Subproject commit 72984c62e434da09f8ea7d7a4fd4a365e0b6f42c