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