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

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

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