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.5 kB

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

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