Browse Source

code format

tags/v1.3.0
gengchao4@huawei.com 3 years ago
parent
commit
21c243759c
2 changed files with 6 additions and 4 deletions
  1. +2
    -2
      ge/graph/build/memory/graph_mem_assigner.cc
  2. +4
    -2
      ge/graph/load/model_manager/model_utils.cc

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

@@ -1601,8 +1601,8 @@ ge::Status GraphMemoryAssigner::UpdateRefOpOutputOffset(const NodePtr &node, con
if (has_inner_offset) {
(void)ge::AttrUtils::SetInt(opdesc->MutableOutputDesc(out_i), ATTR_NAME_INNER_OFFSET, inner_offset);
}
GELOGI("Node[%s] output[%d] is updated from reuse input index[%d] to offset[%ld], inner_offset[%ld]", opdesc->GetName().c_str(),
out_i, ref_in, input_offset, inner_offset);
GELOGI("Node[%s] output[%d] is updated from reuse input index[%d] to offset[%ld], inner_offset[%ld]",
opdesc->GetName().c_str(), out_i, ref_in, input_offset, inner_offset);
}
}
return ge::SUCCESS;


+ 4
- 2
ge/graph/load/model_manager/model_utils.cc View File

@@ -355,7 +355,8 @@ vector<void *> ModelUtils::GetInputDataAddrs(const RuntimeParam &model_param, Co
non_const_index++;
int64_t inner_offset = 0;
(void)ge::AttrUtils::GetInt(op_desc->MutableInputDesc(i), ATTR_NAME_INNER_OFFSET, inner_offset);
GE_IF_BOOL_EXEC(model_param.var_size != 0 && ge::VarManager::Instance(session_id)->IsVarAddr(input_offset - inner_offset),
GE_IF_BOOL_EXEC(model_param.var_size != 0
&& ge::VarManager::Instance(session_id)->IsVarAddr(input_offset - inner_offset),
uint8_t *variable_addr = nullptr;
GE_CHK_STATUS_EXEC(GetVarAddr(model_param, op_desc, input_offset - inner_offset,
tensor_size + inner_offset, variable_addr), return {});
@@ -470,7 +471,8 @@ vector<void *> ModelUtils::GetOutputDataAddrs(const RuntimeParam &model_param, C
(void)ge::AttrUtils::GetInt(op_desc->MutableOutputDesc(i), ATTR_NAME_INNER_OFFSET, inner_offset);
int64_t tensor_size = 0;
GE_CHK_STATUS_EXEC(TensorUtils::GetSize(*tensor_desc, tensor_size), return {});
GE_IF_BOOL_EXEC(model_param.var_size != 0 && ge::VarManager::Instance(session_id)->IsVarAddr(v_output_offset[i] - inner_offset),
GE_IF_BOOL_EXEC(model_param.var_size != 0
&& ge::VarManager::Instance(session_id)->IsVarAddr(v_output_offset[i] - inner_offset),
uint8_t *variable_addr = nullptr;
GE_CHK_STATUS_EXEC(GetVarAddr(model_param, op_desc, v_output_offset[i] - inner_offset,
tensor_size + inner_offset, variable_addr), return {});


Loading…
Cancel
Save