|
|
|
/**
|
|
|
|
* Copyright 2019-2020 Huawei Technologies Co., Ltd
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
package aicpu.dump;
|
|
|
|
|
|
|
|
message Shape {
|
|
|
|
repeated uint64 dim = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Output {
|
|
|
|
int32 data_type = 1;
|
|
|
|
int32 format = 2;
|
|
|
|
Shape shape = 3;
|
|
|
|
uint64 address = 4;
|
|
|
|
string original_name = 5;
|
|
|
|
int32 original_output_index = 6;
|
|
|
|
int32 original_output_data_type = 7;
|
|
|
|
int32 original_output_format = 8;
|
|
|
|
uint64 size = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Input {
|
|
|
|
int32 data_type =1;
|
|
|
|
int32 format = 2;
|
|
|
|
Shape shape = 3;
|
|
|
|
uint64 address = 4;
|
|
|
|
uint64 size = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum BufferType {
|
|
|
|
L1 = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
message OpBuffer {
|
|
|
|
BufferType buffer_type = 1;
|
|
|
|
uint64 address = 2;
|
|
|
|
uint64 size = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Op {
|
|
|
|
string op_name = 1;
|
|
|
|
string op_type = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Task {
|
|
|
|
uint32 task_id = 1;
|
|
|
|
uint32 stream_id = 2;
|
|
|
|
Op op = 3;
|
|
|
|
repeated Output output = 4;
|
|
|
|
bool end_graph = 5;
|
|
|
|
repeated Input input = 6;
|
|
|
|
repeated OpBuffer buffer = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message OpMappingInfo {
|
|
|
|
string dump_path = 1;
|
|
|
|
oneof model_name_param {
|
|
|
|
string model_name = 2;
|
|
|
|
}
|
|
|
|
oneof model_id_param {
|
|
|
|
uint32 model_id = 3;
|
|
|
|
}
|
|
|
|
oneof step_id {
|
|
|
|
uint64 step_id_addr = 4;
|
|
|
|
}
|
|
|
|
oneof iterations_per_loop {
|
|
|
|
uint64 iterations_per_loop_addr = 5;
|
|
|
|
}
|
|
|
|
oneof loop_cond {
|
|
|
|
uint64 loop_cond_addr = 6;
|
|
|
|
}
|
|
|
|
uint32 flag = 7; // 0x01 load, 0x00 unload
|
|
|
|
repeated Task task = 8;
|
|
|
|
string dump_step = 9;
|
|
|
|
}
|