Browse Source

fix data directlly connect netoutput scene

tags/v1.3.0
wxl 3 years ago
parent
commit
cbfc856b3e
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      ge/hybrid/model/hybrid_model_builder.cc

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

@@ -1539,14 +1539,20 @@ Status HybridModelBuilder::IdentifyVariableOutputs(NodeItem &node_item) {
in_data_anchor->GetIdx(), in_data_anchor->GetIdx(),
src_node->GetName().c_str(), src_node->GetName().c_str(),
src_op_type.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));
GELOGD("Got parent output index = %u", parent_index);
if (src_op_type == DATA) {
int ref_i = 0;
(void)AttrUtils::GetInt(src_node->GetOpDesc(), ATTR_NAME_PARENT_NODE_INDEX, ref_i);
node_item.reuse_inputs.emplace(static_cast<int>(parent_index), ref_i);
GELOGD("[%s] output[%u] resues input[%d]", node_item.NodeName().c_str(), parent_index, ref_i);
}


if (src_op_type != CONSTANTOP && src_op_type != CONSTANT && src_op_type != VARIABLE) { if (src_op_type != CONSTANTOP && src_op_type != CONSTANT && src_op_type != VARIABLE) {
continue; continue;
} }


uint32_t parent_index = 0;
GE_CHK_STATUS_RET_NOLOG(GetParentNodeOutputIndex(*net_output_desc, in_data_anchor->GetIdx(), parent_index));
GELOGD("Got parent output index = %u", parent_index);
GE_CHECK_LE(parent_index, INT32_MAX); GE_CHECK_LE(parent_index, INT32_MAX);
node_item.ref_outputs.emplace(static_cast<int>(parent_index), src_node); node_item.ref_outputs.emplace(static_cast<int>(parent_index), src_node);
if (src_op_type == CONSTANTOP || src_op_type == CONSTANT) { if (src_op_type == CONSTANTOP || src_op_type == CONSTANT) {


Loading…
Cancel
Save