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.

node_def.proto 2.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. syntax = "proto3";
  2. package domi.tensorflow;
  3. option cc_enable_arenas = true;
  4. option java_outer_classname = "NodeProto";
  5. option java_multiple_files = true;
  6. option java_package = "org.tensorflow.framework";
  7. import "attr_value.proto";
  8. message NodeDef {
  9. // The name given to this operator. Used for naming inputs,
  10. // logging, visualization, etc. Unique within a single GraphDef.
  11. // Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
  12. string name = 1;
  13. // The operation name. There may be custom parameters in attrs.
  14. // Op names starting with an underscore are reserved for internal use.
  15. string op = 2;
  16. // Each input is "node:src_output" with "node" being a string name and
  17. // "src_output" indicating which output tensor to use from "node". If
  18. // "src_output" is 0 the ":0" suffix can be omitted. Regular inputs
  19. // may optionally be followed by control inputs that have the format
  20. // "^node".
  21. repeated string input = 3;
  22. // A (possibly partial) specification for the device on which this
  23. // node should be placed.
  24. // The expected syntax for this string is as follows:
  25. //
  26. // DEVICE_SPEC ::= PARTIAL_SPEC
  27. //
  28. // PARTIAL_SPEC ::= ("/" CONSTRAINT) *
  29. // CONSTRAINT ::= ("job:" JOB_NAME)
  30. // | ("replica:" [1-9][0-9]*)
  31. // | ("task:" [1-9][0-9]*)
  32. // | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
  33. //
  34. // Valid values for this string include:
  35. // * "/job:worker/replica:0/task:1/device:GPU:3" (full specification)
  36. // * "/job:worker/device:GPU:3" (partial specification)
  37. // * "" (no specification)
  38. //
  39. // If the constraints do not resolve to a single device (or if this
  40. // field is empty or not present), the runtime will attempt to
  41. // choose a device automatically.
  42. string device = 4;
  43. // Operation-specific graph-construction-time configuration.
  44. // Note that this should include all attrs defined in the
  45. // corresponding OpDef, including those with a value matching
  46. // the default -- this allows the default to change and makes
  47. // NodeDefs easier to interpret on their own. However, if
  48. // an attr with a default is not specified in this list, the
  49. // default will be used.
  50. // The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
  51. // one of the names from the corresponding OpDef's attr field).
  52. // The values must have a type matching the corresponding OpDef
  53. // attr's type field.
  54. // Add some examples here showing best practices.
  55. map<string, AttrValue> attr = 5;
  56. };

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