/**
 * 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.
 */

syntax = "proto3";
package ascendc_ir.proto;

import "af_ir.proto";
message AscTensorDef {
  af.proto.AscTensorAttrGroupsDef attr = 1;
}

message AscInputSourceDef {
  string src_node_name = 1;
  int32 src_out_index = 2;
}

message IrDef {
  repeated string input_names = 1; // IR上的输入名
  repeated string output_names = 2; // IR上的输出名
  repeated int64 input_ir_type = 3; // IR上的输入类型
  repeated int64 output_ir_type = 4; // IR上的输出类型
  string type = 5; // IR的类型
  repeated int64 input_nums = 6; // IR的输入个数
  repeated int64 output_nums = 7; // IR的输入个数
}

message AscNodeDef {
  repeated AscInputSourceDef input_src = 1;
  repeated AscTensorDef outputs = 2;
  af.proto.AscNodeAttrGroupsDef attr = 3;
  IrDef ir_def = 4;
}

message AscGraphDef {
  af.proto.AscGraphAttrGroupsDef asc_graph_attr = 1;
  repeated AscNodeDef asc_node = 2;
  string graph_name = 3;
}