Browse Source

fix memory_range_validate error when get input data addrs

tags/v1.3.0
lichun 3 years ago
parent
commit
99b80ab7d9
3 changed files with 5 additions and 3 deletions
  1. +1
    -1
      ge/graph/build/model_builder.cc
  2. +1
    -1
      ge/graph/load/model_manager/model_utils.cc
  3. +3
    -1
      ge/hybrid/model/hybrid_model_builder.cc

+ 1
- 1
ge/graph/build/model_builder.cc View File

@@ -243,7 +243,7 @@ Status ModelBuilder::SetInputOutputDesc() {
}
// if user set input node format ND, the expected node for data and netoutput format is ND in
// final graph.
if ((GetLocalOmgContext().format == domi::DOMI_TENSOR_ND) && (!node_op_desc->HasAttr("_is_single_op")) &&
if ((compute_graph_->GetParentGraph() == nullptr) && (GetLocalOmgContext().format == domi::DOMI_TENSOR_ND) && (!node_op_desc->HasAttr("_is_single_op")) &&
((node_op_desc->GetType() == DATA_TYPE) || (node_op_desc->GetType() == NETOUTPUT))) {
auto inputDescsPtr = node_op_desc->GetAllInputsDescPtr();
auto outputDescsPtr = node_op_desc->GetAllOutputsDescPtr();


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

@@ -319,7 +319,7 @@ vector<void *> ModelUtils::GetInputDataAddrs(const RuntimeParam &model_param, Co
const GeTensorDescPtr tensor_desc = op_desc->MutableInputDesc(static_cast<uint32_t>(i));
GE_IF_BOOL_EXEC(tensor_desc == nullptr, GELOGD("Op: %s, Index: %zu, has no input", op_desc->GetName().c_str(), i);
continue;)
if ((i < v_is_input_const.size()) && v_is_input_const[i] && (op_type != NETOUTPUT)) {
if ((i < v_is_input_const.size()) && v_is_input_const[i]) {
// TBE: add weights address to input
int64_t tensor_size = 0;
GE_CHK_STATUS(TensorUtils::GetSize(*tensor_desc, tensor_size));


+ 3
- 1
ge/hybrid/model/hybrid_model_builder.cc View File

@@ -1541,7 +1541,9 @@ Status HybridModelBuilder::IdentifyVariableOutputs(NodeItem &node_item) {
src_node->GetName().c_str(),
src_op_type.c_str());
uint32_t parent_index = 0;
GE_CHK_STATUS_RET_NOLOG(GetParentNodeOutputIndex(*net_output_desc, in_data_anchor->GetIdx(), parent_index));
if (GetParentNodeOutputIndex(*net_output_desc, in_data_anchor->GetIdx(), parent_index) != SUCCESS) {
continue;
}
GELOGD("Got parent output index = %u", parent_index);
if (src_op_type == DATA) {
int ref_i = 0;


Loading…
Cancel
Save