From 774e74a3f9fe7cab7eb7a90933aef6b2e3ac8f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E9=B9=8F?= Date: Tue, 28 Jun 2022 09:25:16 +0000 Subject: [PATCH] =?UTF-8?q?!581=20=E4=BF=AE=E5=A4=8Ddump=E5=AD=90=E5=9B=BE?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=97=B6=20=20origin=20name=E6=9C=AA?= =?UTF-8?q?=E6=8B=BC=E6=8E=A5=E6=A0=B9=E5=9B=BE=E8=8A=82=E7=82=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20Merge=20pull=20request=20!581=20from=20?= =?UTF-8?q?=E8=96=9B=E9=B9=8F/r1.9.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser/tensorflow/tensorflow_parser.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/parser/tensorflow/tensorflow_parser.cc b/parser/tensorflow/tensorflow_parser.cc index 951101e..a1a2d9a 100644 --- a/parser/tensorflow/tensorflow_parser.cc +++ b/parser/tensorflow/tensorflow_parser.cc @@ -206,6 +206,14 @@ void AddDumpOriginName(const std::string& subgraph_name, const ge::NodePtr paren } GELOGD("Add dump origin name %s for node %s.", original_names[0].c_str(), node->GetName().c_str()); } +void AddDumpOriginNameForRootGraph(const ge::ComputeGraphPtr& graph) { + for (auto &node : graph->GetDirectNode()) { + if (ge::AttrUtils::SetListStr(node->GetOpDesc(), ge::ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES, {node->GetName()})) { + GELOGD("Add dump origin name %s for node %s.", node->GetName().c_str(), + node->GetName().c_str()); + } + } +} } // namespace ge namespace ge { @@ -273,6 +281,7 @@ Status GenSubgraphParseTasks(const ge::ComputeGraphPtr &parent_graph, std::deque Status PostOpProcessForSubgraph(const ParseArg &arg) { if (arg.parent_node == nullptr) { + AddDumpOriginNameForRootGraph(arg.graph); return SUCCESS; } std::string op_type = arg.parent_node->GetType();