From f16552e85470390c2aeab9f6b1ce73d089ee7638 Mon Sep 17 00:00:00 2001 From: zhaozhixuan Date: Sat, 16 Oct 2021 14:10:12 +0800 Subject: [PATCH] Clear the status of ParserContext in the initialization phase --- parser/common/acl_graph_parser_util.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/parser/common/acl_graph_parser_util.cc b/parser/common/acl_graph_parser_util.cc index 5d10bc9..acd82a8 100644 --- a/parser/common/acl_graph_parser_util.cc +++ b/parser/common/acl_graph_parser_util.cc @@ -598,6 +598,19 @@ domi::Status AclGrphParseUtil::CheckOptions(const std::map &parser_params, string &graph_name) { GELOGI("Parse graph user options start."); + ge::GetParserContext().input_nodes_format_map.clear(); + ge::GetParserContext().output_formats.clear(); + ge::GetParserContext().user_input_dims.clear(); + ge::GetParserContext().input_dims.clear(); + ge::GetParserContext().op_conf_map.clear(); + ge::GetParserContext().user_out_nodes.clear(); + ge::GetParserContext().default_out_nodes.clear(); + ge::GetParserContext().out_nodes_map.clear(); + ge::GetParserContext().user_out_tensors.clear(); + ge::GetParserContext().net_out_nodes.clear(); + ge::GetParserContext().out_tensor_names.clear(); + ge::GetParserContext().data_tensor_names.clear(); + GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(CheckOptions(parser_params) != SUCCESS, return PARAM_INVALID, "[Check][Options] Parse paragrams invalid, graph:%s.", graph_name.c_str());