|
|
@@ -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) { |
|
|
|