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.

attr_value.proto 2.9 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 = "AttrValueProtos";
  12. option java_multiple_files = true;
  13. option java_package = "org.tensorflow.framework";
  14. import "tensor.proto";
  15. import "tensor_shape.proto";
  16. import "types.proto";
  17. // Protocol buffer representing the value for an attr used to configure an Op.
  18. // Comment indicates the corresponding attr type. Only the field matching the
  19. // attr type may be filled.
  20. message AttrValue {
  21. // LINT.IfChange
  22. message ListValue {
  23. repeated bytes s = 2; // "list(string)"
  24. repeated int64 i = 3 [packed = true]; // "list(int)"
  25. repeated float f = 4 [packed = true]; // "list(float)"
  26. repeated bool b = 5 [packed = true]; // "list(bool)"
  27. repeated DataType type = 6 [packed = true]; // "list(type)"
  28. repeated TensorShapeProto shape = 7; // "list(shape)"
  29. repeated TensorProto tensor = 8; // "list(tensor)"
  30. repeated NameAttrList func = 9; // "list(attr)"
  31. }
  32. // LINT.ThenChange(https://www.tensorflow.org/code/tensorflow/c/c_api.cc)
  33. oneof value {
  34. bytes s = 2; // "string"
  35. int64 i = 3; // "int"
  36. float f = 4; // "float"
  37. bool b = 5; // "bool"
  38. DataType type = 6; // "type"
  39. TensorShapeProto shape = 7; // "shape"
  40. TensorProto tensor = 8; // "tensor"
  41. ListValue list = 1; // any "list(...)"
  42. // "func" represents a function. func.name is a function's name or
  43. // a primitive op's name. func.attr.first is the name of an attr
  44. // defined for that function. func.attr.second is the value for
  45. // that attr in the instantiation.
  46. NameAttrList func = 10;
  47. // This is a placeholder only used in nodes defined inside a
  48. // function. It indicates the attr value will be supplied when
  49. // the function is instantiated. For example, let us suppose a
  50. // node "N" in function "FN". "N" has an attr "A" with value
  51. // placeholder = "foo". When FN is instantiated with attr "foo"
  52. // set to "bar", the instantiated node N's attr A will have been
  53. // given the value "bar".
  54. string placeholder = 9;
  55. }
  56. }
  57. // A list of attr names and their values. The whole list is attached
  58. // with a string name. E.g., MatMul[T=float].
  59. message NameAttrList {
  60. string name = 1;
  61. map<string, AttrValue> attr = 2;
  62. }

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