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 3.0 kB

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

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