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_task.proto 3.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /**
  2. * Copyright 2019-2020 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 toolkit.dumpdata;
  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_RESERVED = 30;
  78. }
  79. message OriginalOp {
  80. string name = 1;
  81. uint32 output_index = 2;
  82. OutputDataType data_type = 3;
  83. OutputFormat format = 4;
  84. }
  85. message Shape {
  86. repeated uint64 dim = 1;
  87. }
  88. message OpOutput {
  89. OutputDataType data_type = 1;
  90. OutputFormat format = 2;
  91. Shape shape = 3;
  92. OriginalOp original_op = 4; // the original op corresponding to the output
  93. bytes data = 5;
  94. uint64 size = 6;
  95. }
  96. message OpInput {
  97. OutputDataType data_type = 1;
  98. OutputFormat format = 2;
  99. Shape shape = 3;
  100. bytes data = 4;
  101. uint64 size = 5;
  102. }
  103. enum BufferType {
  104. L1 = 0;
  105. }
  106. message OpBuffer {
  107. BufferType buffer_type = 1;
  108. bytes data = 2;
  109. uint64 size = 3;
  110. }
  111. message DumpData{
  112. string version = 1;
  113. uint64 dump_time = 2;
  114. repeated OpOutput output = 3;
  115. repeated OpInput input = 4;
  116. repeated OpBuffer buffer = 5;
  117. }

图引擎模块(GE)是MindSpore的一个子模块,其代码由C++实现,位于前端模块ME和底层硬件之间,起到承接作用。图引擎模块以ME下发的图作为输入,然后进行一系列的深度图优化操作,最后输出一张可以在底层硬件上高效运行的图。GE针对昇腾AI处理器的硬件结构特点,做了特定的优化工作,以此来充分发挥出昇腾AI处理器的强大算力。在进行模型训练/推理时,GE会被自动调用而用户并不感知。GE主要由GE API和GE Core两部分组成,详细的架构图如下所示