* 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 ge.mobile.proto;
message DumpDef {
string name = 1;
string type = 2;
int64 id = 3;
int64 stream_id = 4;
repeated int64 output_addr = 5;
}
message ModelTaskDef {
string version = 1;
map<string, string> attr = 9;
repeated TaskDef task = 10;
uint64 memory_size = 11;
uint32 stream_num = 12;
uint32 event_num = 13;
uint64 weight_size = 14;
repeated bytes op = 15;
uint64 base_addr = 16;
uint64 weight_addr = 17;
uint32 batch_num = 18;
repeated bytes layer = 30;
uint32 label_num = 31;
repeated DumpDef dumpDef = 32;
repeated bytes dumpTensor = 33;
}
message TaskDef {
uint32 id = 1;
uint32 type = 2;
uint32 stream_id = 10;
uint32 event_id = 11;
KernelDef kernel = 20;
KernelExDef kernel_ex = 21;
KernelHcclDef kernel_hccl = 25;
EventExDef event_ex = 26;
LabelDef label = 30;
}
message KernelDef {
KernelContext context = 1;
string stub_func = 10;
uint32 block_dim = 11;
uint32 args_size = 12;
bytes args = 13;
bytes sm_desc = 14;
bytes flowtable = 15;
uint64 module_addr = 16;
uint32 module_size = 17;
uint64 task_offset = 18;
uint64 kernel_addr = 19;
uint32 kernel_size = 20;
uint64 binary_addr = 21;
uint32 binary_size = 22;
}
message KernelContext {
uint32 kernel_type = 1;
uint32 op_id = 2;
uint32 kernel_func_id = 3;
uint32 op_index = 4;
bool is_flowtable = 5;
bytes args_offset = 6;
uint32 args_count = 7;
repeated uint32 origin_op_index = 8;
}
message KernelExDef {
uint32 flags = 1;
uint32 op_index = 4;
uint32 args_size = 12;
bytes args = 13;
}
message KernelHcclDef {
uint32 op_index = 8;
string hccl_type = 9;
}
message EventExDef {
uint32 op_index = 1;
uint32 event_type = 2;
}
message LabelDef {
uint32 label_id = 1;
uint32 cond_type = 10;
uint64 cond_value = 11;
}