You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dump_data.proto 3.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /**
  2. * Copyright 2021 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. syntax = "proto3";
  17. package debugger.dump;
  18. enum OutputDataType {
  19. DT_UNDEFINED = 0;
  20. DT_FLOAT = 1;
  21. DT_FLOAT16 = 2;
  22. DT_INT8 = 3;
  23. DT_UINT8 = 4;
  24. DT_INT16 = 5;
  25. DT_UINT16 = 6;
  26. DT_INT32 = 7;
  27. DT_INT64 = 8;
  28. DT_UINT32 = 9;
  29. DT_UINT64 = 10;
  30. DT_BOOL = 11;
  31. DT_DOUBLE = 12;
  32. DT_STRING = 13;
  33. DT_DUAL_SUB_INT8 = 14;
  34. DT_DUAL_SUB_UINT8 = 15;
  35. DT_COMPLEX64 = 16;
  36. DT_COMPLEX128 = 17;
  37. DT_QINT8 = 18;
  38. DT_QINT16 = 19;
  39. DT_QINT32 = 20;
  40. DT_QUINT8 = 21;
  41. DT_QUINT16 = 22;
  42. DT_RESOURCE = 23;
  43. DT_STRING_REF = 24;
  44. DT_DUAL = 25;
  45. }
  46. enum OutputFormat {
  47. FORMAT_NCHW = 0;
  48. FORMAT_NHWC = 1;
  49. FORMAT_ND = 2;
  50. FORMAT_NC1HWC0 = 3;
  51. FORMAT_FRACTAL_Z = 4;
  52. FORMAT_NC1C0HWPAD = 5;
  53. FORMAT_NHWC1C0 = 6;
  54. FORMAT_FSR_NCHW = 7;
  55. FORMAT_FRACTAL_DECONV = 8;
  56. FORMAT_C1HWNC0 = 9;
  57. FORMAT_FRACTAL_DECONV_TRANSPOSE = 10;
  58. FORMAT_FRACTAL_DECONV_SP_STRIDE_TRANS = 11;
  59. FORMAT_NC1HWC0_C04 = 12;
  60. FORMAT_FRACTAL_Z_C04 = 13;
  61. FORMAT_CHWN = 14;
  62. FORMAT_FRACTAL_DECONV_SP_STRIDE8_TRANS = 15;
  63. FORMAT_HWCN = 16;
  64. FORMAT_NC1KHKWHWC0 = 17;
  65. FORMAT_BN_WEIGHT = 18;
  66. FORMAT_FILTER_HWCK = 19;
  67. FORMAT_HASHTABLE_LOOKUP_LOOKUPS = 20;
  68. FORMAT_HASHTABLE_LOOKUP_KEYS = 21;
  69. FORMAT_HASHTABLE_LOOKUP_VALUE = 22;
  70. FORMAT_HASHTABLE_LOOKUP_OUTPUT = 23;
  71. FORMAT_HASHTABLE_LOOKUP_HITS = 24;
  72. FORMAT_C1HWNCoC0 = 25;
  73. FORMAT_MD = 26;
  74. FORMAT_NDHWC = 27;
  75. FORMAT_FRACTAL_ZZ = 28;
  76. FORMAT_FRACTAL_NZ = 29;
  77. FORMAT_NCDHW = 30;
  78. FORMAT_DHWCN = 31; // 3D filter input tensor format
  79. FORMAT_NDC1HWC0 = 32;
  80. FORMAT_FRACTAL_Z_3D=33;
  81. FORMAT_CN = 34;
  82. FORMAT_NC = 35;
  83. FORMAT_DHWNC = 36;
  84. FORMAT_FRACTAL_Z_3D_TRANSPOSE = 37; // 3D filter(transpose) input tensor format
  85. FORMAT_FRACTAL_ZN_LSTM = 38;
  86. FORMAT_FRACTAL_Z_G = 39;
  87. FORMAT_RESERVED = 40;
  88. // Add new formats definition here
  89. FORMAT_MAX = 0xff;
  90. }
  91. message OriginalOp {
  92. string name = 1;
  93. uint32 output_index = 2;
  94. OutputDataType data_type = 3;
  95. OutputFormat format = 4;
  96. }
  97. message Shape {
  98. repeated uint64 dim = 1;
  99. }
  100. message OpOutput {
  101. OutputDataType data_type = 1;
  102. OutputFormat format = 2;
  103. Shape shape = 3;
  104. OriginalOp original_op = 4; // the original op corresponding to the output
  105. bytes data = 5;
  106. uint64 size = 6;
  107. Shape original_shape = 7;
  108. int32 sub_format = 8;
  109. }
  110. message OpInput {
  111. OutputDataType data_type = 1;
  112. OutputFormat format = 2;
  113. Shape shape = 3;
  114. bytes data = 4;
  115. uint64 size = 5;
  116. Shape original_shape = 6;
  117. int32 sub_format = 7;
  118. }
  119. enum BufferType {
  120. L1 = 0;
  121. }
  122. message OpBuffer {
  123. BufferType buffer_type = 1;
  124. bytes data = 2;
  125. uint64 size = 3;
  126. }
  127. message DumpData {
  128. string version = 1;
  129. uint64 dump_time = 2;
  130. repeated OpOutput output = 3;
  131. repeated OpInput input = 4;
  132. repeated OpBuffer buffer = 5;
  133. string op_name = 6;
  134. }