diff --git a/parser/tensorflow/graph_optimizer.cc b/parser/tensorflow/graph_optimizer.cc index e04b77d..f46b950 100644 --- a/parser/tensorflow/graph_optimizer.cc +++ b/parser/tensorflow/graph_optimizer.cc @@ -1508,9 +1508,19 @@ Status ParserGraphOptimizer::UpdateGraph(vector &nodes) { GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(nodes.size() == 0, return PARAM_INVALID, "nodes is empty."); + std::string fusion_op_name; + for (auto node : nodes) { + fusion_op_name += node->GetName(); + } + + const uint32_t kFusionOpNameMaxLen = 1024; + if (fusion_op_name.size() > kFusionOpNameMaxLen) { + fusion_op_name = nodes[0]->GetName(); + } + OpDescPtr fusion_node_opdef = nullptr; GE_MAKE_SHARED( - fusion_node_opdef = std::make_shared(nodes[0]->GetOpDesc()->GetName(), nodes[0]->GetOpDesc()->GetType()), + fusion_node_opdef = std::make_shared(fusion_op_name, nodes[0]->GetOpDesc()->GetType()), fusion_node_opdef = nullptr; return FAILED);