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.

insert_op.proto 3.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. syntax = "proto3";
  2. package domi;
  3. message InsertNewOps {
  4. repeated AippOpParams aipp_op = 1;
  5. repeated MultiShapeOpParams multi_shape_op = 2;
  6. }
  7. message AippOpParams {
  8. enum InputFormat {
  9. UNDEFINED = 0;
  10. YUV420SP_U8 = 1;
  11. XRGB8888_U8 = 2;
  12. RGB888_U8 = 3;
  13. YUV400_U8 = 4;
  14. NC1HWC0DI_FP16 = 5;
  15. NC1HWC0DI_S8 = 6;
  16. ARGB8888_U8 = 7;
  17. YUYV_U8 = 8;
  18. YUV422SP_U8 = 9;
  19. AYUV444_U8 = 10;
  20. RAW10 = 11;
  21. RAW12 = 12;
  22. RAW16 = 13;
  23. RAW24 = 14;
  24. RGB16 = 15;
  25. RGB20 = 16;
  26. RGB24 = 17;
  27. RGB8_IR = 18;
  28. RGB16_IR = 19;
  29. RGB24_IR = 20;
  30. }
  31. enum AippMode {
  32. undefined = 0;
  33. static = 1;
  34. dynamic = 2;
  35. }
  36. // AIPPģʽ־̬AIPPͶ̬AIPP
  37. AippMode aipp_mode = 1;
  38. // related_input_rankΪΪͣ÷Χ>=0, <=DataӵĸĬֵΪ0
  39. // ʶģ͵ĵڼAIPPģ룬ҪԵ2AIPPrelated_input_rankΪ1
  40. uint32 related_input_rank = 2;
  41. // related_input_name is optional and the top name of data node which inserts aipp
  42. string related_input_name = 6;
  43. // input_edge_idxΪѡΪͣ÷ΧΪ>=0
  44. // øòãڶDataӲͬͬAIPPòûãĬ϶related_input_rankָģAIPP
  45. // ֵ <= Dataߵĸ
  46. repeated uint32 input_edge_idx = 3;
  47. // [Begin] ̬AIPPþ̬AIPPʱЧ
  48. uint32 max_src_image_size = 4;
  49. // Ƿ֧תĬϲ֧֣֧תʱжĿռʧ
  50. bool support_rotation = 5;
  51. // [End] ̬AIPP
  52. // [Begin] ̬AIPPö̬AIPPʱЧ
  53. InputFormat input_format = 51;
  54. bool csc_switch = 52;
  55. float cpadding_value = 53;
  56. bool rbuv_swap_switch = 54;
  57. bool ax_swap_switch = 55;
  58. bool single_line_mode = 56;
  59. int32 src_image_size_w = 57;
  60. int32 src_image_size_h = 58;
  61. bool crop = 59;
  62. int32 load_start_pos_w = 60;
  63. int32 load_start_pos_h = 61;
  64. int32 crop_size_w = 62;
  65. int32 crop_size_h = 63;
  66. bool resize = 64;
  67. int32 resize_output_w = 65;
  68. int32 resize_output_h = 66;
  69. bool padding = 67;
  70. int32 left_padding_size = 68;
  71. int32 right_padding_size = 69;
  72. int32 top_padding_size = 70;
  73. int32 bottom_padding_size = 71;
  74. int32 mean_chn_0 = 10;
  75. int32 mean_chn_1 = 11;
  76. int32 mean_chn_2 = 12;
  77. int32 mean_chn_3 = 19;
  78. float min_chn_0 = 13;
  79. float min_chn_1 = 14;
  80. float min_chn_2 = 15;
  81. float min_chn_3 = 20;
  82. repeated float var_reci_chn_0 = 16;
  83. repeated float var_reci_chn_1 = 17;
  84. repeated float var_reci_chn_2 = 18;
  85. repeated float var_reci_chn_3 = 21;
  86. repeated int32 matrix_r0c0 = 30;
  87. repeated int32 matrix_r0c1 = 31;
  88. repeated int32 matrix_r0c2 = 32;
  89. repeated int32 matrix_r1c0 = 33;
  90. repeated int32 matrix_r1c1 = 34;
  91. repeated int32 matrix_r1c2 = 35;
  92. repeated int32 matrix_r2c0 = 36;
  93. repeated int32 matrix_r2c1 = 37;
  94. repeated int32 matrix_r2c2 = 38;
  95. repeated int32 output_bias_0 = 39;
  96. repeated int32 output_bias_1 = 40;
  97. repeated int32 output_bias_2 = 41;
  98. repeated int32 input_bias_0 = 42;
  99. repeated int32 input_bias_1 = 43;
  100. repeated int32 input_bias_2 = 44;
  101. // [End] ̬AIPP
  102. // The n number that is used for raw/rgbir data into f16 transformation.
  103. // The transformation equation is x/(2^n). If set to 0, no transform is performed.
  104. uint32 raw_rgbir_to_f16_n = 45;
  105. }
  106. message MultiShapeOpParams {
  107. enum MultiShapeMode {
  108. batch = 0; //̬batch
  109. resolution = 1; //ֱ̬ʣչ
  110. }
  111. MultiShapeMode mode = 1; //ģʽ
  112. uint32 related_input_rank = 2; //Ӳ뵽ĸ
  113. repeated uint32 batch_list = 11; //batch_listֵbatch_listĸ28֮
  114. }

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