Browse Source

bugfix for nopadding reuse

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

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

@@ -1700,6 +1700,10 @@ 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;
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) {


Loading…
Cancel
Save