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"""TensorFlow versions.""" 17 18from tensorflow.python.client import pywrap_tf_session 19from tensorflow.python.util.tf_export import tf_export 20 21__version__ = pywrap_tf_session.__version__ 22__git_version__ = pywrap_tf_session.__git_version__ 23__compiler_version__ = pywrap_tf_session.__compiler_version__ 24__cxx11_abi_flag__ = pywrap_tf_session.__cxx11_abi_flag__ 25__monolithic_build__ = pywrap_tf_session.__monolithic_build__ 26 27VERSION = __version__ 28tf_export( 29 "version.VERSION", 30 "__version__", 31 v1=["version.VERSION", "VERSION", "__version__"]).export_constant( 32 __name__, "VERSION") 33GIT_VERSION = __git_version__ 34tf_export( 35 "version.GIT_VERSION", 36 "__git_version__", 37 v1=["version.GIT_VERSION", "GIT_VERSION", 38 "__git_version__"]).export_constant(__name__, "GIT_VERSION") 39COMPILER_VERSION = __compiler_version__ 40tf_export( 41 "version.COMPILER_VERSION", 42 "__compiler_version__", 43 v1=["version.COMPILER_VERSION", "COMPILER_VERSION", 44 "__compiler_version__"]).export_constant(__name__, "COMPILER_VERSION") 45 46CXX11_ABI_FLAG = __cxx11_abi_flag__ 47tf_export( 48 "sysconfig.CXX11_ABI_FLAG", 49 "__cxx11_abi_flag__", 50 v1=["sysconfig.CXX11_ABI_FLAG", "CXX11_ABI_FLAG", 51 "__cxx11_abi_flag__"]).export_constant(__name__, "CXX11_ABI_FLAG") 52MONOLITHIC_BUILD = __monolithic_build__ 53tf_export( 54 "sysconfig.MONOLITHIC_BUILD", 55 "__monolithic_build__", 56 v1=[ 57 "sysconfig.MONOLITHIC_BUILD", "MONOLITHIC_BUILD", "__monolithic_build__" 58 ]).export_constant(__name__, "MONOLITHIC_BUILD") 59 60GRAPH_DEF_VERSION = pywrap_tf_session.GRAPH_DEF_VERSION 61tf_export( 62 "version.GRAPH_DEF_VERSION", 63 v1=["version.GRAPH_DEF_VERSION", "GRAPH_DEF_VERSION"]).export_constant( 64 __name__, "GRAPH_DEF_VERSION") 65GRAPH_DEF_VERSION_MIN_CONSUMER = ( 66 pywrap_tf_session.GRAPH_DEF_VERSION_MIN_CONSUMER) 67tf_export( 68 "version.GRAPH_DEF_VERSION_MIN_CONSUMER", 69 v1=[ 70 "version.GRAPH_DEF_VERSION_MIN_CONSUMER", 71 "GRAPH_DEF_VERSION_MIN_CONSUMER" 72 ]).export_constant(__name__, "GRAPH_DEF_VERSION_MIN_CONSUMER") 73GRAPH_DEF_VERSION_MIN_PRODUCER = ( 74 pywrap_tf_session.GRAPH_DEF_VERSION_MIN_PRODUCER) 75tf_export( 76 "version.GRAPH_DEF_VERSION_MIN_PRODUCER", 77 v1=[ 78 "version.GRAPH_DEF_VERSION_MIN_PRODUCER", 79 "GRAPH_DEF_VERSION_MIN_PRODUCER" 80 ]).export_constant(__name__, "GRAPH_DEF_VERSION_MIN_PRODUCER") 81 82__all__ = [ 83 "__version__", 84 "__git_version__", 85 "__compiler_version__", 86 "__cxx11_abi_flag__", 87 "__monolithic_build__", 88 "COMPILER_VERSION", 89 "CXX11_ABI_FLAG", 90 "GIT_VERSION", 91 "GRAPH_DEF_VERSION", 92 "GRAPH_DEF_VERSION_MIN_CONSUMER", 93 "GRAPH_DEF_VERSION_MIN_PRODUCER", 94 "VERSION", 95 "MONOLITHIC_BUILD", 96] 97