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.

op_mapping.proto 1.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. syntax = "proto3";
  2. package toolkit.aicpu.dump;
  3. message Shape {
  4. repeated uint64 dim = 1;
  5. }
  6. message Output {
  7. int32 data_type = 1;
  8. int32 format = 2;
  9. Shape shape = 3;
  10. uint64 address = 4;
  11. string original_name = 5;
  12. int32 original_output_index = 6;
  13. int32 original_output_data_type = 7;
  14. int32 original_output_format = 8;
  15. uint64 size = 9;
  16. Shape origin_shape = 10;
  17. }
  18. message Input {
  19. int32 data_type =1;
  20. int32 format = 2;
  21. Shape shape = 3;
  22. uint64 address = 4;
  23. uint64 size = 5;
  24. Shape origin_shape = 6;
  25. }
  26. enum BufferType {
  27. L1 = 0;
  28. }
  29. message OpBuffer {
  30. BufferType buffer_type = 1;
  31. uint64 address = 2;
  32. uint64 size = 3;
  33. }
  34. message Op {
  35. string op_name = 1;
  36. string op_type = 2;
  37. }
  38. message Task {
  39. uint32 task_id = 1;
  40. uint32 stream_id = 2;
  41. Op op = 3;
  42. repeated Output output = 4;
  43. bool end_graph = 5;
  44. repeated Input input = 6;
  45. repeated OpBuffer buffer = 7;
  46. }
  47. message OpMappingInfo {
  48. string dump_path = 1;
  49. oneof model_name_param {
  50. string model_name = 2;
  51. }
  52. oneof model_id_param {
  53. uint32 model_id = 3;
  54. }
  55. oneof step_id {
  56. uint64 step_id_addr = 4;
  57. }
  58. oneof iterations_per_loop {
  59. uint64 iterations_per_loop_addr = 5;
  60. }
  61. oneof loop_cond {
  62. uint64 loop_cond_addr = 6;
  63. }
  64. uint32 flag = 7; // 0x01 load, 0x00 unload
  65. repeated Task task = 8;
  66. string dump_step = 9;
  67. }

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