tensorflow_version.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. ==============================================================================*/
  12. #ifndef TENSORFLOW_CORE_PUBLIC_VERSION_H_
  13. #define TENSORFLOW_CORE_PUBLIC_VERSION_H_
  14. // TensorFlow uses semantic versioning, see http://semver.org/.
  15. // Also update tensorflow/tensorflow.bzl and
  16. // tensorflow/tools/pip_package/setup.py
  17. #define TF_MAJOR_VERSION 2
  18. #define TF_MINOR_VERSION 2
  19. #define TF_PATCH_VERSION 0
  20. // TF_VERSION_SUFFIX is non-empty for pre-releases (e.g. "-alpha", "-alpha.1",
  21. // "-beta", "-rc", "-rc.1")
  22. #define TF_VERSION_SUFFIX ""
  23. #define TF_STR_HELPER(x) #x
  24. #define TF_STR(x) TF_STR_HELPER(x)
  25. // e.g. "0.5.0" or "0.6.0-alpha".
  26. #define TF_VERSION_STRING \
  27. (TF_STR(TF_MAJOR_VERSION) "." TF_STR(TF_MINOR_VERSION) "." TF_STR( \
  28. TF_PATCH_VERSION) TF_VERSION_SUFFIX)
  29. // GraphDef compatibility versions (the versions field in graph.proto).
  30. //
  31. // Each graph has producer and min_consumer versions, and each
  32. // consumer has its own version and a min_producer. In addition, graphs can
  33. // mark specific consumer versions as bad (to prevent bugs from executing).
  34. // A consumer will execute a graph if the consumer's version is at least the
  35. // graph's min_consumer, the graph's producer version is at least the consumer's
  36. // min_producer, and the consumer version isn't specifically disallowed by the
  37. // graph.
  38. //
  39. // By default, newly created graphs have producer version TF_GRAPH_DEF_VERSION
  40. // min_consumer TF_GRAPH_DEF_MIN_CONSUMER, and no other bad consumer versions.
  41. //
  42. // Version history:
  43. //
  44. // 0. Graphs created before GraphDef versioning
  45. // 1. First real version (2dec2015)
  46. // 2. adjust_contrast only takes float, doesn't perform clamping (11dec2015)
  47. // 3. Remove TileGrad, since it was equivalent to reduce_sum (30dec2015)
  48. // 4. When support for this version is removed, we can safely make AttrValue
  49. // parsing more strict with respect to empty list values (see
  50. // 111635679, 7jan2016).
  51. // 5. Graphs are wholly-validated during Session::Create() (7jan2016).
  52. // 6. TensorFlow is scalar strict within Google (27jan2016).
  53. // 7. Remove TopK in favor of TopKV2 (5feb2016).
  54. // 8. Replace RandomCrop from C++ with pure Python (5feb2016).
  55. // 9. Deprecate batch_norm_with_global_normalization (16feb2016).
  56. // 10. Deprecate conv3d_backprop_{filter,input} (10jun2016).
  57. // 11. Deprecate {batch}_self_adjoint_eig (3aug2016).
  58. // 12. Graph consumers understand the node_def field of FunctionDef (22aug2016).
  59. // 13. Deprecate multiple batch linear algebra ops (9sep2016).
  60. // 14. Deprecate batch_matrix_* ops. (10sep2016).
  61. // 15. Deprecate batch_fft_* ops. (14sep2016).
  62. // 16. Deprecate tensor_array (v1) ops in favor of v2 (10nov2016).
  63. // 17. Deprecate inv (11nov2016).
  64. // 17. Expose reverse_v2 (10nov2016)
  65. // 18. Add VariableV2 (30nov2016)
  66. // 19. Deprecated ops created by models moved out of core SkipGram, NegTrain.
  67. // (08dec2016)
  68. // 20. Catch all version 1.0 changes to Python API generation. SplitV is now
  69. // used for tf.split, ReverseV2 is now used by tf.reverse, ConcatV2 is
  70. // now used by tf.concat. Graphs use flooring
  71. // division and mod semantics. TensorArrayV3. (12dec2016)
  72. // Also considered the version for when it is required for reduction
  73. // ops' indices to be scalar or vector, and not higher rank.
  74. // Some earlier graph def versions allowed this.
  75. // 21. Dropped FunctionDef.Node support, switched to node_def introduced
  76. // in version 12. (11jan2017)
  77. // 22. Placeholder now can specify and enforce scalar and partial
  78. // shapes, particularly when restoring a graph from GraphDef
  79. // produced at version 22 or later. (04/10/2016)
  80. // 23. Remove NonMaxSuppression in favor of NonMaxSuppressionV2.
  81. // 24. Deprecate lookup ops (v1) ops in favor of v2 (30may2017)
  82. // 25. Deprecate stack (v1) ops in favor of v2 (2017/6/15).
  83. // 25. Deprecate RandomPoisson (v1) ops in favor of v2 (2017/10/25).
  84. // 26. Add a bool 'stripped_default_attrs' to MetaInfoDef indicating
  85. // whether default-valued attrs have been stripped from the nodes in the
  86. // GraphDef. (7dec2017)
  87. // 27. Deprecate TensorArray ops v2 in favor of v3 and deprecated io_ops
  88. // deprecated in favor of V2 ops. (2018/01/23)
  89. // 28. Deprecate MatrixExponential op in favor of Python implementation.
  90. // (2018/08/21).
  91. // (2019/02/15). Added `control_ret` field to FunctionDef proto, and
  92. // `control_output` field to OpDef proto.
  93. // 29. Deprecate StatefulStandardNormal op in favor of StatefulStandardNormalV2.
  94. // (2019/03/25).
  95. // (2019/04/17). Added `arg_attr` field to FunctionDefProto.
  96. // 30. (2019/05/09) First date based GraphDef version. GraphDef
  97. // versions advance by 1 each day after this point.
  98. #define TF_GRAPH_DEF_VERSION_MIN_PRODUCER 0
  99. #define TF_GRAPH_DEF_VERSION_MIN_CONSUMER 0
  100. #define TF_GRAPH_DEF_VERSION 427 // Updated: 2020/6/9
  101. // Checkpoint compatibility versions (the versions field in SavedSliceMeta).
  102. //
  103. // The checkpoint versions have the same semantics as GraphDef versions, but the
  104. // numbering scheme is separate. We have no plans to ever deprecate checkpoint
  105. // versions, but it's good to have this in place in case we ever need to.
  106. //
  107. // Version history:
  108. //
  109. // 0. Checkpoints saved before checkpoint versioning.
  110. // 1. First real version (10feb2015).
  111. #define TF_CHECKPOINT_VERSION_MIN_PRODUCER 0
  112. #define TF_CHECKPOINT_VERSION_MIN_CONSUMER 0
  113. #define TF_CHECKPOINT_VERSION 1
  114. /// Version query functions (defined in generated version_info.cc)
  115. // Host compiler version (declared elsewhere to be __VERSION__)
  116. extern const char* tf_compiler_version();
  117. // The git commit designator when tensorflow was built
  118. // If no git repository, this will be "internal".
  119. extern const char* tf_git_version();
  120. // Value of the _GLIBCXX_USE_CXX11_ABI flag, or 0 if it's not set.
  121. extern int tf_cxx11_abi_flag();
  122. // Returns 1 if build is monolithic, or 0 otherwise.
  123. extern int tf_monolithic_build();
  124. #endif // TENSORFLOW_CORE_PUBLIC_VERSION_H_