Browse Source

bugfix for nopadding ref

tags/v1.3.0
gengchao4@huawei.com 3 years ago
parent
commit
f4d8ba5d38
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      ge/graph/build/memory/graph_mem_assigner.cc
  2. +1
    -1
      metadef

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

@@ -1700,6 +1700,8 @@ void GraphMemoryAssigner::PrintMemoryOffset() {
ge::Status GraphMemoryAssigner::TryGetNodeRefIndexes(const NodePtr &node, map<int32_t, int32_t> &out2ins) const{ ge::Status GraphMemoryAssigner::TryGetNodeRefIndexes(const NodePtr &node, map<int32_t, int32_t> &out2ins) const{
for (const auto &out_data_anchor : node->GetAllOutDataAnchors()) { for (const auto &out_data_anchor : node->GetAllOutDataAnchors()) {
int32_t reuse_in_index = -1; 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)) { if (GraphUtils::IsNoPaddingRefFromInput(out_data_anchor, reuse_in_index)) {
out2ins.emplace(out_data_anchor->GetIdx(), reuse_in_index); out2ins.emplace(out_data_anchor->GetIdx(), reuse_in_index);
return ge::SUCCESS; return ge::SUCCESS;


+ 1
- 1
metadef

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

Loading…
Cancel
Save