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

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

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