• 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 #define TF_MAJOR_VERSION 1
22 #define TF_MINOR_VERSION 6
23 #define TF_PATCH_VERSION 0
24 
25 // TF_VERSION_SUFFIX is non-empty for pre-releases (e.g. "-alpha", "-alpha.1",
26 // "-beta", "-rc", "-rc.1")
27 #define TF_VERSION_SUFFIX "-rc1"
28 
29 #define TF_STR_HELPER(x) #x
30 #define TF_STR(x) TF_STR_HELPER(x)
31 
32 // e.g. "0.5.0" or "0.6.0-alpha".
33 #define TF_VERSION_STRING                                            \
34   (TF_STR(TF_MAJOR_VERSION) "." TF_STR(TF_MINOR_VERSION) "." TF_STR( \
35       TF_PATCH_VERSION) TF_VERSION_SUFFIX)
36 
37 // TODO(josh11b): Public API functions for exporting the above.
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 
100 #define TF_GRAPH_DEF_VERSION_MIN_PRODUCER 0
101 #define TF_GRAPH_DEF_VERSION_MIN_CONSUMER 0
102 #define TF_GRAPH_DEF_VERSION 26
103 
104 // Checkpoint compatibility versions (the versions field in SavedSliceMeta).
105 //
106 // The checkpoint versions have the same semantics as GraphDef versions, but the
107 // numbering scheme is separate.  We have no plans to ever deprecate checkpoint
108 // versions, but it's good to have this in place in case we ever need to.
109 //
110 // Version history:
111 //
112 // 0. Checkpoints saved before checkpoint versioning.
113 // 1. First real version (10feb2015).
114 #define TF_CHECKPOINT_VERSION_MIN_PRODUCER 0
115 #define TF_CHECKPOINT_VERSION_MIN_CONSUMER 0
116 #define TF_CHECKPOINT_VERSION 1
117 
118 /// Version query functions (defined in generated version_info.cc)
119 
120 // Host compiler version (declared elsewhere to be __VERSION__)
121 extern const char* tf_compiler_version();
122 // The git commit designator when tensorflow was built
123 // If no git repository, this will be "internal".
124 extern const char* tf_git_version();
125 // Value of the _GLIBCXX_USE_CXX11_ABI flag, or 0 if it's not set.
126 extern const int tf_cxx11_abi_flag();
127 // Returns 1 if build is monolithic, or 0 otherwise.
128 extern const int tf_monolithic_build();
129 
130 #endif  // TENSORFLOW_CORE_PUBLIC_VERSION_H_
131