* 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 AICPU_IR2TF_STRUCT_H_
#define AICPU_IR2TF_STRUCT_H_
#include <string>
#include <vector>
namespace aicpu {
struct RefTransDesc {
std::string src_inout_name;
std::string dst_inout_name;
bool is_ref;
};
struct ParserExpDesc {
std::string src_field_name;
std::string dst_field_name;
std::string parser_express;
};
struct DynamicExpDesc {
std::string index;
std::string type;
std::string name;
};
struct ExtendFieldDesc {
std::string field_name;
std::string data_type;
std::string default_value;
};
struct OpMapInfo {
std::string src_op_type;
std::string dst_op_type;
std::string attrs_blacklist;
std::vector<ParserExpDesc> attrs_map_desc;
std::vector<DynamicExpDesc> attrs_dynamic_desc;
std::vector<ParserExpDesc> attrs_input_map_desc;
std::vector<ParserExpDesc> input_attr_map_desc;
std::vector<RefTransDesc> input_ref_map_desc;
std::vector<ParserExpDesc> attrs_output_map_desc;
std::vector<ParserExpDesc> output_attr_map_desc;
std::vector<RefTransDesc> output_ref_desc;
std::vector<ExtendFieldDesc> attr_ext_desc;
};
struct IRFMKOpMapLib {
std::string version;
std::vector<OpMapInfo> ir2tf;
std::vector<OpMapInfo> tf2ir;
};
}
#endif