* Copyright (c) 2025 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
#ifndef INC_FRAMEWORK_OMG_PARSER_PARSER_INNER_CONTEXT_H_
#define INC_FRAMEWORK_OMG_PARSER_PARSER_INNER_CONTEXT_H_
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "register/register_fmk_types.h"
#include "register/register_types.h"
#include "framework/omg/omg_inner_types.h"
namespace ge {
struct ParserContext {
std::unordered_map<std::string, domi::domiTensorFormat_t> input_nodes_format_map;
std::vector<domi::domiTensorFormat_t> output_formats;
std::vector<std::pair<std::string, std::vector<int64_t>>> user_input_dims;
std::map<std::string, std::vector<int64_t>> input_dims;
std::map<std::string, std::string> op_conf_map;
std::vector<std::pair<std::string, int32_t>> user_out_nodes;
std::vector<std::pair<std::string, int32_t>> default_out_nodes;
std::map<std::string, std::vector<int32_t>> out_nodes_map;
std::vector<std::string> user_out_tensors;
std::vector<std::string> net_out_nodes;
std::vector<std::string> out_tensor_names;
std::vector<std::string> data_tensor_names;
bool is_dynamic_input = false;
bool train_flag = false;
domi::domiTensorFormat_t format = domi::DOMI_TENSOR_ND;
domi::FrameworkType type = domi::FRAMEWORK_RESERVED;
RunMode run_mode = RunMode::GEN_OM_MODEL;
std::string custom_proto_path;
std::string caffe_proto_path;
std::string enable_scope_fusion_passes;
std::map<std::string, std::pair<std::string, int32_t>> final_out_nodes_map;
};
GE_FUNC_VISIBILITY ParserContext &GetParserContext();
}
#endif