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.

tensor_shape.proto 1.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Protocol buffer representing the shape of tensors.
  2. syntax = "proto3";
  3. option cc_enable_arenas = true;
  4. option java_outer_classname = "TensorShapeProtos";
  5. option java_multiple_files = true;
  6. option java_package = "org.tensorflow.framework";
  7. package domi.tensorflow;
  8. // Dimensions of a tensor.
  9. message TensorShapeProto {
  10. // One dimension of the tensor.
  11. message Dim {
  12. // Size of the tensor in that dimension.
  13. // This value must be >= -1, but values of -1 are reserved for "unknown"
  14. // shapes (values of -1 mean "unknown" dimension). Certain wrappers
  15. // that work with TensorShapeProto may fail at runtime when deserializing
  16. // a TensorShapeProto containing a dim value of -1.
  17. int64 size = 1;
  18. // Optional name of the tensor dimension.
  19. string name = 2;
  20. };
  21. // Dimensions of the tensor, such as {"input", 30}, {"output", 40}
  22. // for a 30 x 40 2D tensor. If an entry has size -1, this
  23. // corresponds to a dimension of unknown size. The names are
  24. // optional.
  25. //
  26. // The order of entries in "dim" matters: It indicates the layout of the
  27. // values in the tensor in-memory representation.
  28. //
  29. // The first entry in "dim" is the outermost dimension used to layout the
  30. // values, the last entry is the innermost dimension. This matches the
  31. // in-memory layout of RowMajor Eigen tensors.
  32. //
  33. // If "dim.size()" > 0, "unknown_rank" must be false.
  34. repeated Dim dim = 2;
  35. // If true, the number of dimensions in the shape is unknown.
  36. //
  37. // If true, "dim.size()" must be 0.
  38. bool unknown_rank = 3;
  39. };

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