|
|
|
@@ -508,12 +508,16 @@ Status GraphMemoryAssigner::AssignContinuousInputMemory(const ge::NodePtr &node, |
|
|
|
std::map<int32_t, int32_t> out2ins; |
|
|
|
GE_CHK_STATUS_RET(GetAllRef(node, out2ins), "Node: %s get all ref failed", node->GetName().c_str()); |
|
|
|
// output is beginning offset, set offset for input; only support this case now |
|
|
|
if (out2ins.size() == 1 && out2ins.begin()->second == 0) { |
|
|
|
if (out2ins.size() == 1 && out2ins.begin()->second == 0 && peer_op_desc->GetType() != VARIABLE) { |
|
|
|
auto peer_output_offset = output_list.at(peer_out_data_anchor->GetIdx()); |
|
|
|
output_list.at(peer_out_data_anchor->GetIdx()) = output_list_this.at(out2ins.begin()->first); |
|
|
|
peer_op_desc->SetOutputOffset(output_list); |
|
|
|
GELOGI("Node %s out %d ref in %d input node %s, use output offset %ld update %ld", node->GetName().c_str(), |
|
|
|
out2ins.begin()->first, out2ins.begin()->second, peer_op_desc->GetName().c_str(), |
|
|
|
output_list_this.at(out2ins.begin()->first), peer_output_offset); |
|
|
|
} else { |
|
|
|
GELOGW("Node %s out %d ref in %d with total ref numbers %zu", node->GetName().c_str(), out2ins.begin()->first, |
|
|
|
out2ins.begin()->second, out2ins.size()); |
|
|
|
GELOGW("Node %s out %d ref in %d input node %s with total ref numbers %zu", node->GetName().c_str(), |
|
|
|
out2ins.begin()->first, out2ins.begin()->second, peer_op_desc->GetName().c_str(), out2ins.size()); |
|
|
|
} |
|
|
|
// first input is beginning offset |
|
|
|
mem_offset = output_list.at(peer_out_data_anchor->GetIdx()); |
|
|
|
|