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.

ge_api.proto 1.5 kB

5 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. syntax = "proto3";
  2. package ge.api_pb;
  3. import "ge_ir.proto";
  4. // GE initialize
  5. message GEInitialize {
  6. map<string, string> options = 1;
  7. };
  8. // initialize response
  9. message GEInitializeResponse {
  10. uint32 status = 1;
  11. uint32 clientId = 2;
  12. };
  13. // GE finalize
  14. message GEFinalize {
  15. bool final = 1;
  16. uint32 clientId = 2;
  17. };
  18. message GEFinalizeResponse {
  19. uint32 status = 1;
  20. };
  21. // GE Session
  22. message CreateSession{
  23. map<string, string> options = 1;
  24. };
  25. message CreateSessionResponse {
  26. uint32 status = 1;
  27. uint64 sessionId = 2;
  28. };
  29. //GE AddGraph
  30. //model serialize :: serializegraph
  31. message SessionAddGraph{
  32. uint32 graphId = 1;
  33. uint64 sessionId = 2;
  34. ge.proto.GraphDef graph = 3;
  35. };
  36. message SessionAddGraphResponse {
  37. uint32 status = 1;
  38. };
  39. //GE SessionRemoveGraph
  40. message SessionRemoveGraph{
  41. uint32 graphId = 1;
  42. uint64 sessionId = 2;
  43. };
  44. message SessionRemoveGraphResponse {
  45. uint32 status = 1;
  46. };
  47. message SessionRunGraph{
  48. uint32 graphId = 1;
  49. uint64 sessionId = 2;
  50. repeated ge.proto.TensorDef tensor = 3;
  51. };
  52. message SessionBuildGraph{
  53. uint32 graphId = 1;
  54. uint64 sessionId = 2;
  55. repeated ge.proto.TensorDef tensor = 3;
  56. string savePath = 4;
  57. };
  58. message SessionRunGraphResponse {
  59. uint32 status = 1;
  60. repeated ge.proto.TensorDef tensor = 2;
  61. };
  62. message SessionBuildGraphResponse {
  63. uint32 status = 1;
  64. };
  65. message DestroySession{
  66. bool final = 1;
  67. uint64 sessionId = 2;
  68. };
  69. message DestroySessionResponse {
  70. uint32 status = 1;
  71. };

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