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.

graph.proto 2.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. syntax = "proto3";
  2. package domi.tensorflow;
  3. option cc_enable_arenas = true;
  4. option java_outer_classname = "GraphProtos";
  5. option java_multiple_files = true;
  6. option java_package = "org.tensorflow.framework";
  7. import "node_def.proto";
  8. import "function.proto";
  9. import "versions.proto";
  10. // Represents the graph of operations
  11. message GraphDef {
  12. repeated NodeDef node = 1;
  13. // Compatibility versions of the graph. See core/public/version.h for version
  14. // history. The GraphDef version is distinct from the TensorFlow version, and
  15. // each release of TensorFlow will support a range of GraphDef versions.
  16. VersionDef versions = 4;
  17. // Deprecated single version field; use versions above instead. Since all
  18. // GraphDef changes before "versions" was introduced were forward
  19. // compatible, this field is entirely ignored.
  20. int32 version = 3 [deprecated = true];
  21. // EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
  22. //
  23. // "library" provides user-defined functions.
  24. //
  25. // Naming:
  26. // * library.function.name are in a flat namespace.
  27. // NOTE: We may need to change it to be hierarchical to support
  28. // different orgs. E.g.,
  29. // { "/google/nn", { ... }},
  30. // { "/google/vision", { ... }}
  31. // { "/org_foo/module_bar", { ... }}
  32. // map<string, FunctionDefLib> named_lib;
  33. // * If node[i].op is the name of one function in "library",
  34. // node[i] is deemed as a function call. Otherwise, node[i].op
  35. // must be a primitive operation supported by the runtime.
  36. //
  37. //
  38. // Function call semantics:
  39. //
  40. // * The callee may start execution as soon as some of its inputs
  41. // are ready. The caller may want to use Tuple() mechanism to
  42. // ensure all inputs are ready in the same time.
  43. //
  44. // * The consumer of return values may start executing as soon as
  45. // the return values the consumer depends on are ready. The
  46. // consumer may want to use Tuple() mechanism to ensure the
  47. // consumer does not start until all return values of the callee
  48. // function are ready.
  49. FunctionDefLibrary library = 2;
  50. };

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