Date: Monday, December 2, 2019 @ 20:02:55 Author: svenstaro Revision: 534743
Prepare tensorflow 2.1.0rc0 Modified: tensorflow/trunk/PKGBUILD Deleted: tensorflow/trunk/33953.patch tensorflow/trunk/bazel1.patch tensorflow/trunk/glibc-2.30.patch tensorflow/trunk/python-3.8.patch ------------------+ 33953.patch | 74 ----------------------- PKGBUILD | 37 ++++------- bazel1.patch | 167 ----------------------------------------------------- glibc-2.30.patch | 89 ---------------------------- python-3.8.patch | 70 ---------------------- 5 files changed, 14 insertions(+), 423 deletions(-) Deleted: 33953.patch =================================================================== --- 33953.patch 2019-12-02 20:01:42 UTC (rev 534742) +++ 33953.patch 2019-12-02 20:02:55 UTC (rev 534743) @@ -1,74 +0,0 @@ -From ea3063c929c69f738bf65bc99dad1159803e772f Mon Sep 17 00:00:00 2001 -From: Yong Tang <yong.tang.git...@outlook.com> -Date: Sun, 3 Nov 2019 19:52:04 +0000 -Subject: [PATCH 1/2] Fix TensorFlow on Python 3.8 logger issue - -This fix tries to address the issue raised in 33799 -where running tensorflow on python 3.8 (Ubuntu 18.04) -raised the following error: -``` -TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 were given -``` - -The issue was that findCaller changed in Python 3.8 - -This PR fixes the issue. - -This PR fixes 33799 - -Signed-off-by: Yong Tang <yong.tang.git...@outlook.com> ---- - tensorflow/python/platform/tf_logging.py | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/tensorflow/python/platform/tf_logging.py b/tensorflow/python/platform/tf_logging.py -index 86a4957c9da6..a397393e7f7e 100644 ---- a/tensorflow/python/platform/tf_logging.py -+++ b/tensorflow/python/platform/tf_logging.py -@@ -57,9 +57,18 @@ def _get_caller(offset=3): - f = f.f_back - return None, None - -- - # The definition of `findCaller` changed in Python 3.2 --if _sys.version_info.major >= 3 and _sys.version_info.minor >= 2: -+if _sys.version_info.major >= 3 and _sys.version_info.minor >= 8: -+ def _logger_find_caller(stack_info=False, stacklevel=1): # pylint: disable=g-wrong-blank-lines -+ code, frame = _get_caller(4) -+ sinfo = None -+ if stack_info: -+ sinfo = '\n'.join(_traceback.format_stack()) -+ if code: -+ return (code.co_filename, frame.f_lineno, code.co_name, sinfo) -+ else: -+ return '(unknown file)', 0, '(unknown function)', sinfo -+elif _sys.version_info.major >= 3 and _sys.version_info.minor >= 2: - def _logger_find_caller(stack_info=False): # pylint: disable=g-wrong-blank-lines - code, frame = _get_caller(4) - sinfo = None - -From 507d1888156ec7c13d61c50c7a440abc86b3b48b Mon Sep 17 00:00:00 2001 -From: Yong Tang <yong.tang.git...@outlook.com> -Date: Sun, 3 Nov 2019 19:54:20 +0000 -Subject: [PATCH 2/2] Update comment explaining python 3.8 change for - findCaller - -Signed-off-by: Yong Tang <yong.tang.git...@outlook.com> ---- - tensorflow/python/platform/tf_logging.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tensorflow/python/platform/tf_logging.py b/tensorflow/python/platform/tf_logging.py -index a397393e7f7e..7c307b1f0a72 100644 ---- a/tensorflow/python/platform/tf_logging.py -+++ b/tensorflow/python/platform/tf_logging.py -@@ -57,7 +57,8 @@ def _get_caller(offset=3): - f = f.f_back - return None, None - --# The definition of `findCaller` changed in Python 3.2 -+# The definition of `findCaller` changed in Python 3.2, -+# and further changed in Python 3.8 - if _sys.version_info.major >= 3 and _sys.version_info.minor >= 8: - def _logger_find_caller(stack_info=False, stacklevel=1): # pylint: disable=g-wrong-blank-lines - code, frame = _get_caller(4) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-12-02 20:01:42 UTC (rev 534742) +++ PKGBUILD 2019-12-02 20:02:55 UTC (rev 534743) @@ -5,39 +5,30 @@ pkgbase=tensorflow pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda python-tensorflow python-tensorflow-opt python-tensorflow-cuda python-tensorflow-opt-cuda) -pkgver=2.0.0 -_pkgver=2.0.0 -pkgrel=6 +pkgver=2.1.0rc0 +_pkgver=2.1.0-rc0 +pkgrel=1 pkgdesc="Library for computation using data flow graphs for scalable machine learning" url="https://www.tensorflow.org/" license=('APACHE') arch=('x86_64') depends=('c-ares') -makedepends=('bazel<1' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' 'gcc' +makedepends=('bazel' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' 'gcc' 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools' 'python-h5py' 'python-keras-applications' 'python-keras-preprocessing') optdepends=('tensorboard: Tensorflow visualization toolkit' 'python-pasta: tf_upgrade_v2 tool') source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz" - 'bazel1.patch' - 'python-3.8.patch' - 'glibc-2.30.patch' - '33953.patch') -sha512sums=('c3a2cb9673d2ade8e83961f7d944165123d0e4d94e6ca4d8fdee4f02f536893b879bbbf78d3ad5e557467b58f97f7194f2d9cfc64d7d05540969be732070eecc' - '5fc101eb0278504b55d71868ef62ae8ada9bd490b544a95124a0dae08c2891b28e3fb476b200fed08b36273ede5ebe923e1c0bb389e45476c68e5c168adf0184' - 'ef06196f1a7f5a4dff4d83916566dae8f2f2c2993ddcd40017583020dd9bfc73ef426c45b0cc5630d1dd53321b99736f2c60b37bb9370be02174c1209e041ffb' - 'a9345b7206e9f8ae9fc33987997808dcdeaf3e4c05caf40785bba2a9ef2292e20046bfd54ce05fee2ccd11ded9d8e918b2a131d830a7e238406e6ddf222e830e' - 'ad06e7553e1a6961ac53eed626c8a390c5dc8967cb172cc07ccc45e4ccef495c15e4a273c469df957a0971c64d9585b3493ff74e863a4f6f53a1e1f676b45870') + Add-grpc-fix-for-gettid.patch) +sha512sums=('1481af1ed43ff03f6a0eeaad9896e2ec021d763bc69bf03e33353d6188074fdfaa1b6c3bba1d4e2496207f468e6a555fe2c962ae15eddd30ef872a3d76e19911' + '64442ef4cf0527cc321b7425273fd998c8e961af0ffbf1bb0a401cdd9237e95cdcebd8c18416e02a5225fabfd53cf0b694a3486791fffbc3e472a8ffaa4b28ff') get_pyver () { - python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' + python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' } prepare() { - patch -Np1 -d tensorflow-${_pkgver} <python-3.8.patch - patch -Np1 -d tensorflow-${_pkgver} <glibc-2.30.patch - patch -Np1 -d tensorflow-${_pkgver} <33953.patch - patch -Np1 -d tensorflow-${_pkgver} <bazel1.patch + patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/Add-grpc-fix-for-gettid.patch cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-cuda @@ -64,7 +55,7 @@ export TF_NEED_ROCM=0 export TF_SET_ANDROID_WORKSPACE=0 export TF_DOWNLOAD_CLANG=0 - export TF_NCCL_VERSION=2.4 + export TF_NCCL_VERSION=2.5 export TF_IGNORE_MAX_BAZEL_VERSION=1 export NCCL_INSTALL_PATH=/usr export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-8 @@ -223,7 +214,7 @@ } package_python-tensorflow() { - depends+=(tensorflow python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) + depends+=(tensorflow python-termcolor python-astor python-gast02 python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) cd "${srcdir}"/tensorflow-${_pkgver} _python_package tmp @@ -231,7 +222,7 @@ package_python-tensorflow-opt() { pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)" - depends+=(tensorflow-opt python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) + depends+=(tensorflow-opt python-termcolor python-astor python-gast02 python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) conflicts=(python-tensorflow) provides=(python-tensorflow) @@ -241,7 +232,7 @@ package_python-tensorflow-cuda() { pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)" - depends+=(tensorflow-cuda python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) + depends+=(tensorflow-cuda python-termcolor python-astor python-gast02 python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) conflicts=(python-tensorflow) provides=(python-tensorflow) @@ -251,7 +242,7 @@ package_python-tensorflow-opt-cuda() { pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)" - depends+=(tensorflow-opt-cuda python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) + depends+=(tensorflow-opt-cuda python-termcolor python-astor python-gast02 python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator) conflicts=(python-tensorflow) provides=(python-tensorflow python-tensorflow-cuda) Deleted: bazel1.patch =================================================================== --- bazel1.patch 2019-12-02 20:01:42 UTC (rev 534742) +++ bazel1.patch 2019-12-02 20:02:55 UTC (rev 534743) @@ -1,167 +0,0 @@ -diff --git a/tensorflow/c/BUILD b/tensorflow/c/BUILD -index f740ba66b5..6cc9003787 100644 ---- a/tensorflow/c/BUILD -+++ b/tensorflow/c/BUILD -@@ -270,6 +270,7 @@ tf_cuda_library( - "//tensorflow/core/platform", - "@com_google_absl//absl/strings", - ], -+ alwayslink = 1, - ) - - exports_files( -diff --git a/tensorflow/c/eager/BUILD b/tensorflow/c/eager/BUILD -index 0c869f0c8b..6bb7e7512d 100644 ---- a/tensorflow/c/eager/BUILD -+++ b/tensorflow/c/eager/BUILD -@@ -79,6 +79,7 @@ tf_cuda_library( - "//tensorflow/core/profiler/lib:profiler_session", - "//tensorflow/core:gpu_runtime", - ], -+ alwayslink = 1, - ) - - tf_cuda_library( -@@ -225,6 +226,7 @@ tf_cuda_library( - "//tensorflow/core/profiler/rpc/client:capture_profile", - "//tensorflow/core:gpu_runtime", - ], -+ alwayslink = 1, - ) - - tf_cuda_cc_test( -diff --git a/tensorflow/cc/saved_model/BUILD b/tensorflow/cc/saved_model/BUILD -index 39b84922d1..b2affdd999 100644 ---- a/tensorflow/cc/saved_model/BUILD -+++ b/tensorflow/cc/saved_model/BUILD -@@ -123,6 +123,7 @@ cc_library( - "//tensorflow/core/util/tensor_bundle:naming", - # mobile not supported yet - ]), -+ alwayslink = 1, - ) - - tf_cc_test( -diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD -index 5194c7be65..9bd4ca5a37 100644 ---- a/tensorflow/core/BUILD -+++ b/tensorflow/core/BUILD -@@ -355,6 +355,7 @@ cc_library( - ":platform_base", - "//third_party/eigen3", - ], -+ alwayslink = 1, - ) - - filegroup( -@@ -798,6 +799,7 @@ cc_library( - ":lib_proto_parsing", - ":protos_all_cc", - ], -+ alwayslink = 1, - ) - - cc_library( -@@ -2500,6 +2502,7 @@ cc_library( - "@com_google_protobuf//:protobuf", - ] + tf_protos_all_impl() + tf_protos_grappler_impl() + - tf_additional_numa_deps(), -+ alwayslink = 1, - ) - - # File compiled with extra flags to get cpu-specific acceleration. -diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl -index 6404fde550..567a1acede 100644 ---- a/tensorflow/core/platform/default/build_config.bzl -+++ b/tensorflow/core/platform/default/build_config.bzl -@@ -228,6 +228,7 @@ def cc_proto_library( - hdrs = gen_hdrs, - deps = cc_libs + deps, - includes = includes, -+ alwayslink = 1, - **kargs - ) - native.cc_library( -diff --git a/tensorflow/lite/kernels/BUILD b/tensorflow/lite/kernels/BUILD -index 4d15517c30..cec349231f 100644 ---- a/tensorflow/lite/kernels/BUILD -+++ b/tensorflow/lite/kernels/BUILD -@@ -564,6 +564,7 @@ cc_library( - "//tensorflow/lite:framework", - "//tensorflow/lite/c:c_api_internal", - ], -+ alwayslink = 1, - ) - - # The builtin_ops target will resolve to optimized kernels when available. This -diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD -index c5fac20d38..dc77f1ab90 100644 ---- a/tensorflow/python/BUILD -+++ b/tensorflow/python/BUILD -@@ -466,6 +466,7 @@ cc_library( - "//tensorflow/core:script_ops_op_lib", - "//third_party/python_runtime:headers", - ], -+ alwayslink = 1, - ) - - cc_library( -@@ -616,6 +617,7 @@ cc_library( - "//tensorflow/core:op_gen_lib", - "//tensorflow/core:protos_all_cc", - ], -+ alwayslink = 1, - ) - - py_library( -diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl -index 97b10bf0d8..65cc206e03 100644 ---- a/tensorflow/tensorflow.bzl -+++ b/tensorflow/tensorflow.bzl -@@ -2323,6 +2323,7 @@ def tf_generate_proto_text_sources(name, srcs_relative_dir, srcs, protodeps = [] - hdrs = out_hdrs, - visibility = visibility, - deps = deps, -+ alwayslink = 1, - ) - - def tf_genrule_cmd_append_to_srcs(to_append): -diff --git a/third_party/protobuf/protobuf.patch b/third_party/protobuf/protobuf.patch -index df0648563d..18fc6cdf35 100644 ---- a/third_party/protobuf/protobuf.patch -+++ b/third_party/protobuf/protobuf.patch -@@ -11,7 +11,15 @@ index 2fb26050..c2744d5b 100644 - - ################################################################################ - # Protobuf Runtime Library --@@ -218,7 +218,7 @@ cc_library( -+@@ -209,6 +209,7 @@ cc_library( -+ copts = COPTS, -+ includes = ["src/"], -+ linkopts = LINK_OPTS, -++ alwayslink = 1, -+ visibility = ["//visibility:public"], -+ deps = [":protobuf_lite"] + PROTOBUF_DEPS, -+ ) -+@@ -219,7 +220,7 @@ cc_library( - # TODO(keveman): Remove this target once the support gets added to Bazel. - cc_library( - name = "protobuf_headers", -@@ -20,3 +28,4 @@ index 2fb26050..c2744d5b 100644 - includes = ["src/"], - visibility = ["//visibility:public"], - ) -+ -\ No newline at end of file -diff --git a/third_party/systemlibs/protobuf.bzl b/third_party/systemlibs/protobuf.bzl -index 774514f3fd..1c415b018b 100644 ---- a/third_party/systemlibs/protobuf.bzl -+++ b/third_party/systemlibs/protobuf.bzl -@@ -262,6 +262,7 @@ def cc_proto_library( - hdrs = gen_hdrs, - deps = cc_libs + deps, - includes = includes, -+ alwayslink = 1, - **kargs - ) - Deleted: glibc-2.30.patch =================================================================== --- glibc-2.30.patch 2019-12-02 20:01:42 UTC (rev 534742) +++ glibc-2.30.patch 2019-12-02 20:02:55 UTC (rev 534743) @@ -1,89 +0,0 @@ -From 7bf3f05197bb6d71beba9dcd0ac83ddfcf7f1919 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu....@windriver.com> -Date: Fri, 23 Aug 2019 13:54:52 +0000 -Subject: [PATCH] grpc: Define gettid() only for glibc < 2.30 - -glibc 2.30 has added this API, so let us use that when possible - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <hongxu....@windriver.com> ---- - tensorflow/workspace.bzl | 1 + - ...01-Define-gettid-only-for-glibc-2.30.patch | 52 +++++++++++++++++++ - 2 files changed, 53 insertions(+) - create mode 100644 third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch - -diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl -index 788eca2f67..8a37fe5643 100755 ---- a/tensorflow/workspace.bzl -+++ b/tensorflow/workspace.bzl -@@ -475,6 +475,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): - sha256 = "1aa84387232dda273ea8fdfe722622084f72c16f7b84bfc519ac7759b71cdc91", - strip_prefix = "grpc-69b6c047bc767b4d80e7af4d00ccb7c45b683dae", - system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), -+ patch_file = clean_dep("//third_party/systemlibs:0001-Define-gettid-only-for-glibc-2.30.patch"), - urls = [ - "https://mirror.bazel.build/github.com/grpc/grpc/archive/69b6c047bc767b4d80e7af4d00ccb7c45b683dae.tar.gz", - "https://github.com/grpc/grpc/archive/69b6c047bc767b4d80e7af4d00ccb7c45b683dae.tar.gz", -diff --git a/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch b/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch -new file mode 100644 -index 0000000000..30f1d7b252 ---- /dev/null -+++ b/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch -@@ -0,0 +1,52 @@ -+From 1d630079c3d1013baebd19060f4e6050112cb66d Mon Sep 17 00:00:00 2001 -+From: Hongxu Jia <hongxu....@windriver.com> -+Date: Fri, 23 Aug 2019 13:52:01 +0000 -+Subject: [PATCH] Define gettid() only for glibc < 2.30 -+ -+glibc 2.30 has added this API, so let us use that when possible -+ -+Upstream-Status: Pending -+Signed-off-by: Khem Raj <raj.k...@gmail.com> -+ -+Signed-off-by: Hongxu Jia <hongxu....@windriver.com> -+--- -+ src/core/lib/gpr/log_linux.cc | 4 ++++ -+ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++++ -+ 2 files changed, 8 insertions(+) -+ -+diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc -+index 561276f..25a7486 100644 -+--- a/src/core/lib/gpr/log_linux.cc -++++ b/src/core/lib/gpr/log_linux.cc -+@@ -40,7 +40,11 @@ -+ #include <time.h> -+ #include <unistd.h> -+ -++#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29) -++#include <unistd.h> -++#else -+ static long gettid(void) { return syscall(__NR_gettid); } -++#endif -+ -+ void gpr_log(const char* file, int line, gpr_log_severity severity, -+ const char* format, ...) { -+diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc -+index 06a382c..ec321f2 100644 -+--- a/src/core/lib/iomgr/ev_epollex_linux.cc -++++ b/src/core/lib/iomgr/ev_epollex_linux.cc -+@@ -1150,8 +1150,12 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, -+ } -+ -+ #ifndef NDEBUG -++#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29) -++#include <unistd.h> -++#else -+ static long gettid(void) { return syscall(__NR_gettid); } -+ #endif -++#endif -+ -+ /* pollset->mu lock must be held by the caller before calling this. -+ The function pollset_work() may temporarily release the lock (pollset->po.mu) -+-- -+2.17.1 -+ --- -2.17.1 - Deleted: python-3.8.patch =================================================================== --- python-3.8.patch 2019-12-02 20:01:42 UTC (rev 534742) +++ python-3.8.patch 2019-12-02 20:02:55 UTC (rev 534743) @@ -1,70 +0,0 @@ -From 3a48a5c1541daa1fc3f49b9dbe0da247e7cd90f3 Mon Sep 17 00:00:00 2001 -From: Yong Tang <yong.tang.git...@outlook.com> -Date: Mon, 21 Oct 2019 14:39:33 +0000 -Subject: [PATCH] Fix build failures for python 3.8 - -This fix tries to address the issue raised in 33543 where -tensorflow build on python 3.8 failed. - -This fix fixed the issue as was suggested in 33543 and pip -builds finished successfully. - -NOTE: tensorflow depends on h5py which does not have python 3.8 -support yet, as such a release version of tensorflow for python 3.8 -may have to wait for h5py first. - -Signed-off-by: Yong Tang <yong.tang.git...@outlook.com> ---- - tensorflow/python/eager/pywrap_tfe_src.cc | 4 ++-- - tensorflow/python/lib/core/bfloat16.cc | 2 +- - tensorflow/python/lib/core/ndarray_tensor_bridge.cc | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tensorflow/python/eager/pywrap_tfe_src.cc b/tensorflow/python/eager/pywrap_tfe_src.cc -index cfae44af209f..109bfe0579b0 100644 ---- a/tensorflow/python/eager/pywrap_tfe_src.cc -+++ b/tensorflow/python/eager/pywrap_tfe_src.cc -@@ -1431,7 +1431,7 @@ static PyTypeObject TFE_Py_Tape_Type = { - sizeof(TFE_Py_Tape), /* tp_basicsize */ - 0, /* tp_itemsize */ - &TFE_Py_Tape_Delete, /* tp_dealloc */ -- nullptr, /* tp_print */ -+ 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ -@@ -1469,7 +1469,7 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = { - sizeof(TFE_Py_ForwardAccumulator), /* tp_basicsize */ - 0, /* tp_itemsize */ - &TFE_Py_ForwardAccumulatorDelete, /* tp_dealloc */ -- nullptr, /* tp_print */ -+ 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ -diff --git a/tensorflow/python/lib/core/bfloat16.cc b/tensorflow/python/lib/core/bfloat16.cc -index fde3a8377028..54be76375c9c 100644 ---- a/tensorflow/python/lib/core/bfloat16.cc -+++ b/tensorflow/python/lib/core/bfloat16.cc -@@ -317,7 +317,7 @@ PyTypeObject PyBfloat16_Type = { - sizeof(PyBfloat16), // tp_basicsize - 0, // tp_itemsize - nullptr, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_print - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare / tp_reserved -diff --git a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc -index 16f693418615..03ff77100d2e 100644 ---- a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc -+++ b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc -@@ -86,7 +86,7 @@ PyTypeObject TensorReleaserType = { - 0, /* tp_itemsize */ - /* methods */ - TensorReleaser_dealloc, /* tp_dealloc */ -- nullptr, /* tp_print */ -+ 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_compare */