Date: Monday, November 22, 2021 @ 06:55:53 Author: felixonmars Revision: 1054215
archrelease: copy trunk to community-staging-x86_64 Added: tensorflow/repos/community-staging-x86_64/ tensorflow/repos/community-staging-x86_64/48935.patch (from rev 1054214, tensorflow/trunk/48935.patch) tensorflow/repos/community-staging-x86_64/PKGBUILD (from rev 1054214, tensorflow/trunk/PKGBUILD) tensorflow/repos/community-staging-x86_64/build-against-actual-mkl.patch (from rev 1054214, tensorflow/trunk/build-against-actual-mkl.patch) tensorflow/repos/community-staging-x86_64/fix-c++17-compat.patch (from rev 1054214, tensorflow/trunk/fix-c++17-compat.patch) tensorflow/repos/community-staging-x86_64/openssl-1.1.patch (from rev 1054214, tensorflow/trunk/openssl-1.1.patch) tensorflow/repos/community-staging-x86_64/test.py (from rev 1054214, tensorflow/trunk/test.py) --------------------------------+ 48935.patch | 926 +++++++++++++++++++++++++++++++++++++++ PKGBUILD | 310 +++++++++++++ build-against-actual-mkl.patch | 37 + fix-c++17-compat.patch | 11 openssl-1.1.patch | 24 + test.py | 12 6 files changed, 1320 insertions(+) Copied: tensorflow/repos/community-staging-x86_64/48935.patch (from rev 1054214, tensorflow/trunk/48935.patch) =================================================================== --- community-staging-x86_64/48935.patch (rev 0) +++ community-staging-x86_64/48935.patch 2021-11-22 06:55:53 UTC (rev 1054215) @@ -0,0 +1,926 @@ +From 0f8fde42d09b199d02cf5d9d79fe76ebf1d260ef Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 6 May 2021 12:13:40 +0200 +Subject: [PATCH 01/14] Fix NumPy 1.20 error with np.prod() + +Reference: #47691, https://stackoverflow.com/questions/66373169 +--- + tensorflow/python/ops/array_ops.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py +index 519f2ef26fcef..d143ee96a2fc9 100644 +--- a/tensorflow/python/ops/array_ops.py ++++ b/tensorflow/python/ops/array_ops.py +@@ -36,6 +36,7 @@ + from tensorflow.python.framework.constant_op import constant + from tensorflow.python.ops import gen_array_ops + from tensorflow.python.ops import gen_math_ops ++from tensorflow.python.ops import math_ops + # go/tf-wildcard-import + # pylint: disable=wildcard-import + from tensorflow.python.ops.gen_array_ops import * +@@ -2894,7 +2895,7 @@ def matrix_set_diag( + + def _constant_if_small(value, shape, dtype, name): + try: +- if np.prod(shape) < 1000: ++ if math_ops.reduce_prod(shape) < 1000: + return constant(value, shape=shape, dtype=dtype, name=name) + except TypeError: + # Happens when shape is a Tensor, list with Tensor elements, etc. + +From 86cbf87703876330b5818b7f170489356d9d2c86 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 6 May 2021 12:34:12 +0200 +Subject: [PATCH 02/14] relax upper bounds for NumPy and SciPy in pip installs + +--- + .../tools/pip_package/setup_with_binary.py | 2 +- + .../install/install_centos_pip_packages.sh | 6 +++--- + .../ci_build/install/install_pip_packages.sh | 4 ++-- + .../install/install_pip_packages_by_version.sh | 2 +- + .../install/install_python3.6_pip_packages.sh | 2 +- + tensorflow/tools/ci_build/release/common.sh | 18 +++++++++--------- + tensorflow/tools/pip_package/setup.py | 2 +- + 7 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/tensorflow/lite/tools/pip_package/setup_with_binary.py b/tensorflow/lite/tools/pip_package/setup_with_binary.py +index 6b9fe534bb2b1..ae06df8245521 100644 +--- a/tensorflow/lite/tools/pip_package/setup_with_binary.py ++++ b/tensorflow/lite/tools/pip_package/setup_with_binary.py +@@ -67,5 +67,5 @@ + package_dir={'': '.'}, + package_data={'': ['*.so', '*.pyd']}, + install_requires=[ +- 'numpy ~= 1.19.2', # Higher versions have a compatibility issue. ++ 'numpy >= 1.19.2 , <1.21', + ]) +diff --git a/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh b/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh +index b9906b9378c79..ab0a766bf22b0 100755 +--- a/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh ++++ b/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh +@@ -55,17 +55,17 @@ pip2 install --upgrade protobuf==3.6.1 + pip3 install --upgrade protobuf==3.6.1 + + pip2 install --upgrade numpy==1.14.5 +-pip3 install --upgrade numpy==1.14.5 ++pip3 install --upgrade numpy>=1.14.5 + + pip2 install scipy==1.2.2 +-pip3 install scipy==1.4.1 ++pip3 install scipy>=1.4.1 + + pip2 install scikit-learn==0.18.1 + pip3 install scikit-learn==0.18.1 + + # pandas required by `inflow` + pip2 install pandas==0.19.2 +-pip3 install pandas==0.19.2 ++pip3 install pandas>=0.19.2 + + # Benchmark tests require the following: + pip2 install psutil +diff --git a/tensorflow/tools/ci_build/install/install_pip_packages.sh b/tensorflow/tools/ci_build/install/install_pip_packages.sh +index f9aa818c57038..6f0bf612e51ec 100755 +--- a/tensorflow/tools/ci_build/install/install_pip_packages.sh ++++ b/tensorflow/tools/ci_build/install/install_pip_packages.sh +@@ -60,9 +60,9 @@ rm -rf /usr/lib/python3/dist-packages/six* + # https://github.com/tensorflow/tensorflow/issues/6968 + # This workaround isn't needed for Ubuntu 16.04 or later. + if $(cat /etc/*-release | grep -q 14.04); then +- pip3 install --no-binary=:all: --upgrade numpy==1.14.5 ++ pip3 install --no-binary=:all: --upgrade numpy>=1.14.5 + else +- pip3 install --upgrade numpy==1.14.5 ++ pip3 install --upgrade numpy>=1.14.5 + fi + + pip3 install scipy==1.4.1 +diff --git a/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh b/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh +index 110928f3b3de5..b536bf20b8992 100755 +--- a/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh ++++ b/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh +@@ -29,7 +29,7 @@ PACKAGES=( + # NOTE: As numpy has releases that break semver guarantees and several other + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. +- "numpy ~= 1.19.2" ++ "numpy>=1.19.2,<1.21" + "auditwheel" + "wheel" + "setuptools" +diff --git a/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh b/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh +index 761973deb28cb..3b49679031c29 100755 +--- a/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh ++++ b/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh +@@ -72,7 +72,7 @@ rm -rf /usr/lib/python3/dist-packages/six* + # numpy needs to be installed from source to fix segfaults. See: + # https://github.com/tensorflow/tensorflow/issues/6968 + # This workaround isn't needed for Ubuntu 16.04 or later. +-pip3 install --no-binary=:all: --upgrade numpy==1.14.5 ++pip3 install --no-binary=:all: --upgrade numpy>=1.14.5 + + pip3 install scipy==1.4.1 + +diff --git a/tensorflow/tools/ci_build/release/common.sh b/tensorflow/tools/ci_build/release/common.sh +index 89eecc5d83c8a..59bafb5198992 100644 +--- a/tensorflow/tools/ci_build/release/common.sh ++++ b/tensorflow/tools/ci_build/release/common.sh +@@ -125,8 +125,8 @@ function install_ubuntu_16_pip_deps { + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. + # TODO(mihaimaruseac): Convert to requirements.txt +- "${PIP_CMD}" install --user 'numpy ~= 1.19.2' +- # Now, install the deps, as listed in setup.py ++ "${PIP_CMD}" install --user 'numpy >= 1.19.2,< 1.21' ++ # Now, install the deps, as listed in setup. py + "${PIP_CMD}" install --user 'absl-py ~= 0.10' + "${PIP_CMD}" install --user 'astunparse ~= 1.6.3' + "${PIP_CMD}" install --user 'flatbuffers ~= 1.12.0' +@@ -149,7 +149,7 @@ function install_ubuntu_16_pip_deps { + # Test dependencies + "${PIP_CMD}" install --user 'grpcio >= 1.37.0, < 2.0' + "${PIP_CMD}" install --user 'portpicker ~= 1.3.1' +- "${PIP_CMD}" install --user 'scipy ~= 1.5.2' ++ "${PIP_CMD}" install --user 'scipy >= 1.5.2, < 1.7' + # LINT.ThenChange(:mac_pip_installations) + # Need to be addressed later. Unblocking 2.4 branchcut + "${PIP_CMD}" install --user 'PyYAML ~= 5.3.1' +@@ -182,7 +182,7 @@ function install_ubuntu_16_python_pip_deps { + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. + # TODO(mihaimaruseac): Convert to requirements.txt +- ${PIP_CMD} install --user 'numpy ~= 1.19.2' ++ ${PIP_CMD} install --user 'numpy >= 1.19.2, < 1.21' + # Now, install the deps, as listed in setup.py + ${PIP_CMD} install --user 'absl-py ~= 0.10' + ${PIP_CMD} install --user 'astunparse ~= 1.6.3' +@@ -206,7 +206,7 @@ function install_ubuntu_16_python_pip_deps { + # Test dependencies + ${PIP_CMD} install --user 'grpcio >= 1.37.0, < 2.0' + ${PIP_CMD} install --user 'portpicker ~= 1.3.1' +- ${PIP_CMD} install --user 'scipy ~= 1.5.2' ++ ${PIP_CMD} install --user 'scipy >= 1.5.2, <1.7' + # LINT.ThenChange(:mac_pip_installations) + # Need to be addressed later. Unblocking 2.4 branchcut + ${PIP_CMD} install --user 'PyYAML ~= 5.3.1' +@@ -225,7 +225,7 @@ function install_macos_pip_deps { + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. + # TODO(mihaimaruseac): Convert to requirements.txt +- ${PIP_CMD} install 'numpy ~= 1.19.2' ++ ${PIP_CMD} install 'numpy >= 1.19.2 , <1.21' + # Now, install the deps, as listed in setup.py + ${PIP_CMD} install 'absl-py ~= 0.10' + ${PIP_CMD} install 'astunparse ~= 1.6.3' +@@ -249,7 +249,7 @@ function install_macos_pip_deps { + # Test dependencies + ${PIP_CMD} install 'grpcio >= 1.37.0, < 2.0' + ${PIP_CMD} install 'portpicker ~= 1.3.1' +- ${PIP_CMD} install 'scipy ~= 1.5.2' ++ ${PIP_CMD} install 'scipy >= 1.5.2, < 1.7' + ${PIP_CMD} install --upgrade certifi + + # LINT.ThenChange(:linux_pip_installations_orig) +@@ -272,7 +272,7 @@ function install_macos_pip_deps_no_venv { + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. + # TODO(mihaimaruseac): Convert to requirements.txt +- ${PIP_CMD} install 'numpy ~= 1.19.2' --user ++ ${PIP_CMD} install 'numpy >= 1.19.2, <1.21' --user + # Now, install the deps, as listed in setup.py + ${PIP_CMD} install 'absl-py ~= 0.10' --user + ${PIP_CMD} install 'astunparse ~= 1.6.3' --user +@@ -296,7 +296,7 @@ function install_macos_pip_deps_no_venv { + # Test dependencies + ${PIP_CMD} install 'grpcio >= 1.37.0, < 2.0' --user + ${PIP_CMD} install 'portpicker ~= 1.3.1' --user +- ${PIP_CMD} install 'scipy ~= 1.5.2' --user ++ ${PIP_CMD} install 'scipy >= 1.5.2, <1.7' --user + ${PIP_CMD} install --upgrade certifi --user + + # LINT.ThenChange(:install_macos_pip_deps) +diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py +index 5fe345ed7ed9f..453c930700139 100644 +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -78,7 +78,7 @@ + # NOTE: As numpy has releases that break semver guarantees and several other + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. +- 'numpy ~= 1.19.2', ++ 'numpy >= 1.19.2, < 1.21', + # Install other dependencies + 'absl-py ~= 0.10', + 'astunparse ~= 1.6.3', + +From 7d2b0cff4e4df1b2b706daaa003f274777b85aa4 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 6 May 2021 12:38:22 +0200 +Subject: [PATCH 03/14] relax upper numpy bound in dockerfiles + +--- + .../dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile | 2 +- + .../dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile | 2 +- + .../tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile | 2 +- + tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile | 2 +- + .../tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile | 2 +- + tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile | 2 +- + .../tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile | 2 +- + .../partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile | 2 +- + .../dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile | 2 +- + 13 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile +index e8a5026d7eddc..5fcca1b4a0d58 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile +@@ -88,7 +88,7 @@ RUN python3 -m pip --no-cache-dir install \ + h5py \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile +index 5efeed2796c5c..381b4084f3e0a 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile +@@ -88,7 +88,7 @@ RUN python3 -m pip --no-cache-dir install \ + h5py \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile +index 88c941704aee6..d9062086b184a 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile +@@ -84,7 +84,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile +index 618d3d211d9df..2d310dec012cf 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile +@@ -84,7 +84,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile +index 4be850f5fae3b..6c100cc9d8e05 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile +@@ -125,7 +125,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile +index feba442ec1c26..a8e9b8d9088fb 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile +@@ -125,7 +125,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile +index 129f983eb319e..a1a5cfbc03040 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile +@@ -83,7 +83,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile +index aa2b9f88702e2..118de55a138de 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile +@@ -83,7 +83,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile +index 0f6a9ae5e5e27..4f94ba1edb119 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile +@@ -124,7 +124,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile +index 7086a0cd5d6d7..0eefc0737d5a8 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile +@@ -124,7 +124,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile b/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile +index ac3d23c3747e8..620660f0b28a4 100644 +--- a/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile ++++ b/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile +@@ -14,7 +14,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile +index 969445c627465..87497f60ae3f9 100644 +--- a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile ++++ b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile +@@ -18,7 +18,7 @@ RUN python3 -m pip --no-cache-dir install \ + h5py \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile +index 0cf475d9deb13..22d2104db7a28 100644 +--- a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile ++++ b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile +@@ -13,7 +13,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.19.0' \ ++ 'numpy<1.21' \ + scipy \ + sklearn \ + pandas \ + +From 795567e8637d9fa4e980ca783704fb2817560a8e Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 10 Jun 2021 21:06:10 +0200 +Subject: [PATCH 04/14] unpin numpy in ci_build requirements_common + +--- + tensorflow/tools/ci_build/release/requirements_common.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/tensorflow/tools/ci_build/release/requirements_common.txt b/tensorflow/tools/ci_build/release/requirements_common.txt +index 716bb9d46c9c0..05890363bc5c1 100644 +--- a/tensorflow/tools/ci_build/release/requirements_common.txt ++++ b/tensorflow/tools/ci_build/release/requirements_common.txt +@@ -1,11 +1,7 @@ + # To have reproducible builds, these dependencies should be pinned always. + # Prefer pinning to the same version as in setup.py + +-# NOTE: As numpy has releases that break semver guarantees and several other +-# deps depend on numpy without an upper bound, we must install numpy before +-# everything else. +-numpy ~= 1.19.2 +-# Now, install the deps, as listed in setup.py ++numpy >= 1.19.2, <1.21 + absl-py ~= 0.10 + astunparse ~= 1.6.3 + flatbuffers ~= 1.12.0 +@@ -22,7 +18,6 @@ wheel ~= 0.35 + wrapt ~= 1.12.1 + # We need to pin the gast dependency exactly + gast == 0.4.0 +-# Finally, install tensorboard and estimator + # Note that here we want the latest version that matches + tb-nightly ~= 2.4.0.a + tensorflow_estimator ~= 2.5.0 + +From 498eb74a8326725d102693700c40fef0faee4323 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Tue, 15 Jun 2021 17:18:55 +0200 +Subject: [PATCH 05/14] Update requirements_common.txt + +--- + tensorflow/tools/ci_build/release/requirements_common.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tensorflow/tools/ci_build/release/requirements_common.txt b/tensorflow/tools/ci_build/release/requirements_common.txt +index 9a4e0b080c5b7..f7b603742ab27 100644 +--- a/tensorflow/tools/ci_build/release/requirements_common.txt ++++ b/tensorflow/tools/ci_build/release/requirements_common.txt +@@ -2,7 +2,7 @@ + # Prefer pinning to the same version as in setup.py for now. + # This will change in the future. + +-absl-py ~= 0.10 ++absl-py ~= 0.12.0 + astunparse ~= 1.6.3 + flatbuffers ~= 2.0 + google_pasta ~= 0.2 + +From 0095e08155b879948c3eb554ad32f33bb318ed23 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Tue, 15 Jun 2021 17:25:08 +0200 +Subject: [PATCH 06/14] unpin numpy in common + +--- + tensorflow/tools/ci_build/release/requirements_common.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tensorflow/tools/ci_build/release/requirements_common.txt b/tensorflow/tools/ci_build/release/requirements_common.txt +index f7b603742ab27..907f1a0cd35e4 100644 +--- a/tensorflow/tools/ci_build/release/requirements_common.txt ++++ b/tensorflow/tools/ci_build/release/requirements_common.txt +@@ -6,9 +6,9 @@ absl-py ~= 0.12.0 + astunparse ~= 1.6.3 + flatbuffers ~= 2.0 + google_pasta ~= 0.2 +-h5py ~= 3.1.0 # NOTE: not the latest version due to py3.6 ++h5py >= 3.1.0 + keras_preprocessing ~= 1.1.2 +-numpy ~= 1.19.5 # NOTE: not the latest version due to py3.6 ++numpy >= 1.19.5 + opt_einsum ~= 3.3.0 + protobuf >= 3.17.1 + six ~= 1.16.0 + +From 444840954cab9fda8be108e83af74d6a79e395b9 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 17 Jun 2021 11:44:08 +0200 +Subject: [PATCH 07/14] shape must be integer tuple + +--- + tensorflow/python/eager/function_test.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tensorflow/python/eager/function_test.py b/tensorflow/python/eager/function_test.py +index ccf3f117e3970..69985f6557c17 100644 +--- a/tensorflow/python/eager/function_test.py ++++ b/tensorflow/python/eager/function_test.py +@@ -279,8 +279,8 @@ def testImplementsAttributeAssertsOnSideInput(self): + z = array_ops.zeros(0) + v = def_function.function( + experimental_implements='func')(lambda x, y: x + y + z) +- a = array_ops.ones((1.0,)) +- b = array_ops.ones((1.0,)) ++ a = array_ops.ones((1,)) ++ b = array_ops.ones((1,)) + with self.assertRaisesRegex(AssertionError, + 'variables are always captured'): + v(a, b) + +From c996d999ad38b1dabf5109dc6e8703d34fe8dd1a Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 5 Aug 2021 13:02:23 +0200 +Subject: [PATCH 08/14] revert changes in ci_build + +--- + .../tools/ci_build/install/install_centos_pip_packages.sh | 6 +++--- + tensorflow/tools/ci_build/install/install_pip_packages.sh | 4 ++-- + .../ci_build/install/install_pip_packages_by_version.sh | 2 +- + .../ci_build/install/install_python3.6_pip_packages.sh | 2 +- + tensorflow/tools/ci_build/release/requirements_common.txt | 4 ++-- + 5 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh b/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh +index e739e368aed4a..5bc21bee05137 100755 +--- a/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh ++++ b/tensorflow/tools/ci_build/install/install_centos_pip_packages.sh +@@ -55,17 +55,17 @@ pip2 install --upgrade protobuf==3.16.0 + pip3 install --upgrade protobuf==3.16.0 + + pip2 install --upgrade numpy==1.14.5 +-pip3 install --upgrade numpy>=1.14.5 ++pip3 install --upgrade numpy~=1.19.2 + + pip2 install scipy==1.2.2 +-pip3 install scipy>=1.4.1 ++pip3 install scipy==1.4.1 + + pip2 install scikit-learn==0.18.1 + pip3 install scikit-learn==0.18.1 + + # pandas required by `inflow` + pip2 install pandas==0.19.2 +-pip3 install pandas>=0.19.2 ++pip3 install pandas==0.19.2 + + # Benchmark tests require the following: + pip2 install psutil +diff --git a/tensorflow/tools/ci_build/install/install_pip_packages.sh b/tensorflow/tools/ci_build/install/install_pip_packages.sh +index 5c82446442014..50dd65d814747 100755 +--- a/tensorflow/tools/ci_build/install/install_pip_packages.sh ++++ b/tensorflow/tools/ci_build/install/install_pip_packages.sh +@@ -60,9 +60,9 @@ rm -rf /usr/lib/python3/dist-packages/six* + # https://github.com/tensorflow/tensorflow/issues/6968 + # This workaround isn't needed for Ubuntu 16.04 or later. + if $(cat /etc/*-release | grep -q 14.04); then +- pip3 install --upgrade numpy>=1.14.5 ++ pip3 install --upgrade numpy==1.14.5 + else +- pip3 install --upgrade numpy>=1.19.2 ++ pip3 install --upgrade numpy~=1.19.2 + fi + + pip3 install scipy==1.4.1 +diff --git a/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh b/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh +index 1471628e3fb9d..1847a02572299 100755 +--- a/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh ++++ b/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh +@@ -29,7 +29,7 @@ PACKAGES=( + # NOTE: As numpy has releases that break semver guarantees and several other + # deps depend on numpy without an upper bound, we must install numpy before + # everything else. +- "numpy>=1.19.2,<1.21" ++ "numpy~=1.19.2" + "auditwheel" + "wheel" + "setuptools" +diff --git a/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh b/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh +index adbe905e8f5db..b16228368fe94 100755 +--- a/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh ++++ b/tensorflow/tools/ci_build/install/install_python3.6_pip_packages.sh +@@ -72,7 +72,7 @@ rm -rf /usr/lib/python3/dist-packages/six* + # numpy needs to be installed from source to fix segfaults. See: + # https://github.com/tensorflow/tensorflow/issues/6968 + # This workaround isn't needed for Ubuntu 16.04 or later. +-pip3 install --upgrade numpy>=1.19.2 ++pip3 install --upgrade numpy~=1.19.2 + + pip3 install scipy==1.4.1 + +diff --git a/tensorflow/tools/ci_build/release/requirements_common.txt b/tensorflow/tools/ci_build/release/requirements_common.txt +index f220e63f7872e..0c2e24dde366a 100644 +--- a/tensorflow/tools/ci_build/release/requirements_common.txt ++++ b/tensorflow/tools/ci_build/release/requirements_common.txt +@@ -6,9 +6,9 @@ absl-py ~= 0.12.0 + astunparse ~= 1.6.3 + flatbuffers ~= 2.0 + google_pasta ~= 0.2 +-h5py >= 3.1.0 ++h5py ~= 3.1.0 # NOTE: not the latest version due to py3.6 + keras_preprocessing ~= 1.1.2 +-numpy >= 1.19.5 ++numpy ~= 1.19.5 # NOTE: not the latest version due to py3.6 + opt_einsum ~= 3.3.0 + protobuf >= 3.17.1 + six ~= 1.16.0 + +From 2c19d2b87a2d5dfb72a75f7fc8c5a033ddc8ea5b Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 5 Aug 2021 13:12:00 +0200 +Subject: [PATCH 09/14] completely unpin numpy in pip_package/setup.py and + clarify comment + +--- + tensorflow/tools/pip_package/setup.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py +index 1d3f2ff5010a7..43f5e5414d8b9 100644 +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -77,8 +77,9 @@ + REQUIRED_PACKAGES = [ + # NOTE: As numpy has releases that break semver guarantees and several other + # deps depend on numpy without an upper bound, we must install numpy before +- # everything else. +- 'numpy >= 1.19.2, < 1.21', ++ # everything else. So make sure that the correct version of NumPy ++ # is already installed before calling pip or setup.py ++ 'numpy', + # Install other dependencies + 'absl-py ~= 0.10', + 'astunparse ~= 1.6.3', + +From 6fbea4164b71bcd98111d8eee75c5505d313da76 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 5 Aug 2021 13:12:43 +0200 +Subject: [PATCH 10/14] revert changes in dockerfiles + +--- + .../dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile | 2 +- + .../dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile | 2 +- + .../tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile | 2 +- + tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile | 2 +- + .../tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile | 2 +- + tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile | 2 +- + .../dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile | 2 +- + .../tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile | 2 +- + .../partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile | 2 +- + .../dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile | 2 +- + 13 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile +index 5fcca1b4a0d58..e8a5026d7eddc 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8-jupyter.Dockerfile +@@ -88,7 +88,7 @@ RUN python3 -m pip --no-cache-dir install \ + h5py \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile +index 381b4084f3e0a..5efeed2796c5c 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/arm64v8/devel-cpu-arm64v8.Dockerfile +@@ -88,7 +88,7 @@ RUN python3 -m pip --no-cache-dir install \ + h5py \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile +index d9062086b184a..88c941704aee6 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile +@@ -84,7 +84,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile +index 2d310dec012cf..618d3d211d9df 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile +@@ -84,7 +84,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile +index a546e851e4967..5ae16c963909e 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile +@@ -125,7 +125,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile +index 0f6b323cf8741..aa374f138fea1 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu.Dockerfile +@@ -125,7 +125,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile +index a1a5cfbc03040..129f983eb319e 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le-jupyter.Dockerfile +@@ -83,7 +83,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile +index 118de55a138de..aa2b9f88702e2 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-cpu-ppc64le.Dockerfile +@@ -83,7 +83,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile +index 4f94ba1edb119..0f6a9ae5e5e27 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le-jupyter.Dockerfile +@@ -124,7 +124,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile +index 0eefc0737d5a8..7086a0cd5d6d7 100644 +--- a/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile ++++ b/tensorflow/tools/dockerfiles/dockerfiles/ppc64le/devel-gpu-ppc64le.Dockerfile +@@ -124,7 +124,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile b/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile +index 620660f0b28a4..ac3d23c3747e8 100644 +--- a/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile ++++ b/tensorflow/tools/dockerfiles/partials/ubuntu/bazel.partial.Dockerfile +@@ -14,7 +14,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile +index 87497f60ae3f9..969445c627465 100644 +--- a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile ++++ b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild-arm64v8.partial.Dockerfile +@@ -18,7 +18,7 @@ RUN python3 -m pip --no-cache-dir install \ + h5py \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ +diff --git a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile +index 22d2104db7a28..0cf475d9deb13 100644 +--- a/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile ++++ b/tensorflow/tools/dockerfiles/partials/ubuntu/bazelbuild.partial.Dockerfile +@@ -13,7 +13,7 @@ RUN python3 -m pip --no-cache-dir install \ + keras_preprocessing \ + matplotlib \ + mock \ +- 'numpy<1.21' \ ++ 'numpy<1.19.0' \ + scipy \ + sklearn \ + pandas \ + +From f12ca91fd4ff9742aa81a3a79c973356d04a2d30 Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 5 Aug 2021 13:16:38 +0200 +Subject: [PATCH 11/14] unpin numpy upper bound in lite + +--- + tensorflow/lite/tools/pip_package/setup_with_binary.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tensorflow/lite/tools/pip_package/setup_with_binary.py b/tensorflow/lite/tools/pip_package/setup_with_binary.py +index ae06df8245521..218303654228d 100644 +--- a/tensorflow/lite/tools/pip_package/setup_with_binary.py ++++ b/tensorflow/lite/tools/pip_package/setup_with_binary.py +@@ -67,5 +67,5 @@ + package_dir={'': '.'}, + package_data={'': ['*.so', '*.pyd']}, + install_requires=[ +- 'numpy >= 1.19.2 , <1.21', ++ 'numpy >= 1.19.2', + ]) + +From b3c1b71ddde978f04fe9b0871605446b616a2013 Mon Sep 17 00:00:00 2001 +From: Mihai Maruseac <mihai.marus...@gmail.com> +Date: Thu, 5 Aug 2021 19:37:05 -0700 +Subject: [PATCH 12/14] Update tensorflow/tools/pip_package/setup.py + +Co-authored-by: Ben Greiner <c...@bnavigator.de> +--- + tensorflow/tools/pip_package/setup.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py +index 43f5e5414d8b9..bfe4402ff63fc 100644 +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -75,8 +75,6 @@ + # comment the versioning scheme. + # NOTE: Please add test only packages to `TEST_PACKAGES` below. + REQUIRED_PACKAGES = [ +- # NOTE: As numpy has releases that break semver guarantees and several other +- # deps depend on numpy without an upper bound, we must install numpy before + # everything else. So make sure that the correct version of NumPy + # is already installed before calling pip or setup.py + 'numpy', + +From c9a34e6ef7cf30df04da066c5bb0cee6f72c96db Mon Sep 17 00:00:00 2001 +From: Mihai Maruseac <mihai.marus...@gmail.com> +Date: Thu, 5 Aug 2021 19:37:13 -0700 +Subject: [PATCH 13/14] Update tensorflow/tools/pip_package/setup.py + +Co-authored-by: Ben Greiner <c...@bnavigator.de> +--- + tensorflow/tools/pip_package/setup.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py +index bfe4402ff63fc..1ab01eac4fc7f 100644 +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -75,9 +75,7 @@ + # comment the versioning scheme. + # NOTE: Please add test only packages to `TEST_PACKAGES` below. + REQUIRED_PACKAGES = [ +- # everything else. So make sure that the correct version of NumPy +- # is already installed before calling pip or setup.py +- 'numpy', ++ 'numpy >=1.19.2, <1.22.0', + # Install other dependencies + 'absl-py ~= 0.10', + 'astunparse ~= 1.6.3', + +From 9a4642fb897e8ac7901253a4225d0d346715545e Mon Sep 17 00:00:00 2001 +From: Ben Greiner <c...@bnavigator.de> +Date: Thu, 2 Sep 2021 13:01:12 +0200 +Subject: [PATCH 14/14] catch NotImplementedError from failed recursive + conversion to ndarray + +--- + tensorflow/python/framework/test_util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py +index 272351517655d..b1f6ca1775ef4 100644 +--- a/tensorflow/python/framework/test_util.py ++++ b/tensorflow/python/framework/test_util.py +@@ -2790,7 +2790,7 @@ def _assertAllCloseRecursive(self, + atol=atol, + msg="Mismatched value: a%s is different from b%s. %s" % + (path_str, path_str, msg)) +- except (ValueError, TypeError) as e: ++ except (ValueError, TypeError, NotImplementedError) as e: + if len(a) != len(b): + raise ValueError( + "Mismatched length: a%s has %d items, but b%s has %d items. %s" % Copied: tensorflow/repos/community-staging-x86_64/PKGBUILD (from rev 1054214, tensorflow/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-11-22 06:55:53 UTC (rev 1054215) @@ -0,0 +1,310 @@ +# Maintainer: Sven-Hendrik Haase <svenst...@gmail.com> +# Maintainer: Konstantin Gizdov (kgizdov) <a...@kge.pw> +# Contributor: Adria Arrufat (archdria) <adria.arrufat+...@protonmail.ch> +# Contributor: Thibault Lorrain (fredszaq) <freds...@gmail.com> + +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.7.0 +_pkgver=2.7.0 +pkgrel=2 +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' 'intel-mkl' 'onednn' 'pybind11' 'openssl' 'lmdb' 'libpng' 'curl' 'giflib' 'icu' 'libjpeg-turbo') +makedepends=('bazel' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' + 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools' 'python-h5py' + 'python-keras-applications' 'python-keras-preprocessing' + 'cython') +optdepends=('tensorboard: Tensorflow visualization toolkit') +source=("$pkgname-$pkgver.tar.gz::https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz" + fix-c++17-compat.patch) +sha512sums=('f1e892583c7b3a73d4d39ec65dc135a5b02c789b357d57414ad2b6d05ad9fbfc8ef81918ba6410e314abd6928b76f764e6ef64c0b0c84b58b50796634be03f39' + 'f682368bb47b2b022a51aa77345dfa30f3b0d7911c56515d428b8326ee3751242f375f4e715a37bb723ef20a86916dad9871c3c81b1b58da85e1ca202bc4901e') + +# consolidate common dependencies to prevent mishaps +_common_py_depends=(python-termcolor python-astor python-gast03 python-numpy python-protobuf absl-py python-h5py python-keras python-keras-applications python-keras-preprocessing python-tensorflow-estimator python-opt_einsum python-astunparse python-pasta python-flatbuffers) + +get_pyver () { + python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' +} + +check_dir() { + # first make sure we do not break parsepkgbuild + if ! command -v cp &> /dev/null; then + >&2 echo "'cp' command not found. PKGBUILD is probably being checked by parsepkgbuild." + if ! command -v install &> /dev/null; then + >&2 echo "'install' command also not found. PKGBUILD must be getting checked by parsepkgbuild." + >&2 echo "Cannot check if directory '${1}' exists. Ignoring." + >&2 echo "If you are not running nacmap or parsepkgbuild, please make sure the PATH is correct and try again." + >&2 echo "PATH should not be '/dummy': PATH=$PATH" + return 0 + fi + fi + # if we are running normally, check the given path + if [ -d "${1}" ]; then + return 0 + else + >&2 echo Directory "${1}" does not exist or is a file! Exiting... + exit 1 + fi +} + +prepare() { + # Allow any bazel version + echo "*" > tensorflow-${_pkgver}/.bazelversion + + # Get rid of hardcoded versions. Not like we ever cared about what upstream + # thinks about which versions should be used anyway. ;) (FS#68772) + sed -i -E "s/'([0-9a-z_-]+) .= [0-9].+[0-9]'/'\1'/" tensorflow-${_pkgver}/tensorflow/tools/pip_package/setup.py + + cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt + cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-cuda + cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt-cuda + + # These environment variables influence the behavior of the configure call below. + export PYTHON_BIN_PATH=/usr/bin/python + export USE_DEFAULT_PYTHON_LIB_PATH=1 + export TF_NEED_JEMALLOC=1 + export TF_NEED_KAFKA=1 + export TF_NEED_OPENCL_SYCL=0 + export TF_NEED_AWS=1 + export TF_NEED_GCP=1 + export TF_NEED_HDFS=1 + export TF_NEED_S3=1 + export TF_ENABLE_XLA=1 + export TF_NEED_GDR=0 + export TF_NEED_VERBS=0 + export TF_NEED_OPENCL=0 + export TF_NEED_MPI=0 + export TF_NEED_TENSORRT=0 + export TF_NEED_NGRAPH=0 + export TF_NEED_IGNITE=0 + export TF_NEED_ROCM=0 + # See https://github.com/tensorflow/tensorflow/blob/master/third_party/systemlibs/syslibs_configure.bzl + export TF_SYSTEM_LIBS="boringssl,curl,cython,gif,icu,libjpeg_turbo,lmdb,nasm,png,pybind11,zlib" + export TF_SET_ANDROID_WORKSPACE=0 + export TF_DOWNLOAD_CLANG=0 + export TF_NCCL_VERSION=$(pkg-config nccl --modversion | grep -Po '\d+\.\d+') + export TF_IGNORE_MAX_BAZEL_VERSION=1 + export TF_MKL_ROOT=/opt/intel/mkl + export NCCL_INSTALL_PATH=/usr + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc + export HOST_C_COMPILER=/usr/bin/gcc + export HOST_CXX_COMPILER=/usr/bin/g++ + export TF_CUDA_CLANG=0 # Clang currently disabled because it's not compatible at the moment. + export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang + export TF_CUDA_PATHS=/opt/cuda,/usr/lib,/usr + export TF_CUDA_VERSION=$(/opt/cuda/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') + export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' /usr/include/cudnn_version.h) + # https://github.com/tensorflow/tensorflow/blob/1ba2eb7b313c0c5001ee1683a3ec4fbae01105fd/third_party/gpus/cuda_configure.bzl#L411-L446 + # according to the above, we should be specifying CUDA compute capabilities as 'sm_XX' or 'compute_XX' from now on + # add latest PTX for future compatibility + export TF_CUDA_COMPUTE_CAPABILITIES=sm_52,sm_53,sm_60,sm_61,sm_62,sm_70,sm_72,sm_75,sm_80,sm_86,compute_86 + + export CC=gcc + export CXX=g++ + + export BAZEL_ARGS="--config=mkl -c opt" +} + +build() { + echo "Building without cuda and without non-x87-64 optimizations" + cd "${srcdir}"/tensorflow-${_pkgver} + export CC_OPT_FLAGS="-march=x86-64" + export TF_NEED_CUDA=0 + ./configure + bazel \ + build ${BAZEL_ARGS[@]} \ + //tensorflow:libtensorflow.so \ + //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ + //tensorflow/tools/pip_package:build_pip_package + bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmp + + + echo "Building without cuda and with non-x86-64 optimizations" + cd "${srcdir}"/tensorflow-${_pkgver}-opt + export CC_OPT_FLAGS="-march=haswell -O3" + export TF_NEED_CUDA=0 + ./configure + bazel \ + build --config=avx2_linux \ + ${BAZEL_ARGS[@]} \ + //tensorflow:libtensorflow.so \ + //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ + //tensorflow/tools/pip_package:build_pip_package + bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpopt + + + echo "Building with cuda and without non-x86-64 optimizations" + cd "${srcdir}"/tensorflow-${_pkgver}-cuda + export CC_OPT_FLAGS="-march=x86-64" + export TF_NEED_CUDA=1 + ./configure + bazel \ + build \ + ${BAZEL_ARGS[@]} \ + //tensorflow:libtensorflow.so \ + //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ + //tensorflow/tools/pip_package:build_pip_package + bazel-bin/tensorflow/tools/pip_package/build_pip_package --gpu "${srcdir}"/tmpcuda + + + echo "Building with cuda and with non-x86-64 optimizations" + cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda + export CC_OPT_FLAGS="-march=haswell -O3" + export TF_NEED_CUDA=1 + ./configure + bazel \ + build --config=avx2_linux \ + ${BAZEL_ARGS[@]} \ + //tensorflow:libtensorflow.so \ + //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ + //tensorflow/tools/pip_package:build_pip_package + bazel-bin/tensorflow/tools/pip_package/build_pip_package --gpu "${srcdir}"/tmpoptcuda +} + +_package() { + # install headers first + install -d "${pkgdir}"/usr/include/tensorflow + cp -r bazel-bin/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/ + # install python-version to get all extra headers + WHEEL_PACKAGE=$(find "${srcdir}"/$1 -name "tensor*.whl") + pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies + # move extra headers to correct location + local _srch_path="${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include + check_dir "${_srch_path}" # we need to quit on broken search paths + find "${_srch_path}" -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do + cp -nr "${_folder}" "${pkgdir}"/usr/include/tensorflow/ + done + # clean up unneeded files + rm -rf "${pkgdir}"/usr/bin + rm -rf "${pkgdir}"/usr/lib + rm -rf "${pkgdir}"/usr/share + # make sure no lib objects are outside valid paths + local _so_srch_path="${pkgdir}/usr/include" + check_dir "${_so_srch_path}" # we need to quit on broken search paths + find "${_so_srch_path}" -type f,l \( -iname "*.so" -or -iname "*.so.*" \) -print0 | while read -rd $'\0' _so_file; do + # check if file is a dynamic executable + ldd "${_so_file}" &>/dev/null && rm -rf "${_so_file}" + done + + # install the rest of tensorflow + tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver} + sed -e 's@/include$@/include/tensorflow@' -i tensorflow.pc -i tensorflow_cc.pc + install -Dm644 tensorflow.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow.pc + install -Dm644 tensorflow_cc.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow_cc.pc + install -Dm755 bazel-bin/tensorflow/libtensorflow.so "${pkgdir}"/usr/lib/libtensorflow.so.${pkgver} + ln -s libtensorflow.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow.so.${pkgver:0:1} + ln -s libtensorflow.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow.so + install -Dm755 bazel-bin/tensorflow/libtensorflow_cc.so "${pkgdir}"/usr/lib/libtensorflow_cc.so.${pkgver} + ln -s libtensorflow_cc.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow_cc.so.${pkgver:0:1} + ln -s libtensorflow_cc.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_cc.so + install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so "${pkgdir}"/usr/lib/libtensorflow_framework.so.${pkgver} + ln -s libtensorflow_framework.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow_framework.so.${pkgver:0:1} + ln -s libtensorflow_framework.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_framework.so + install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h + install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE + + # Fix interoperability of C++14 and C++17. See https://bugs.archlinux.org/task/65953 + patch -Np0 -i "${srcdir}"/fix-c++17-compat.patch -d "${pkgdir}"/usr/include/tensorflow/absl/base +} + +_python_package() { + WHEEL_PACKAGE=$(find "${srcdir}"/$1 -name "tensor*.whl") + pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies + + # create symlinks to headers + local _srch_path="${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ + check_dir "${_srch_path}" # we need to quit on broken search paths + find "${_srch_path}" -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do + rm -rf "${_folder}" + _smlink="$(basename "${_folder}")" + ln -s /usr/include/tensorflow/"${_smlink}" "${_srch_path}" + done + + # tensorboard has been separated from upstream but they still install it with + # tensorflow. I don't know what kind of sense that makes but we have to clean + # it out from this pacakge. + rm -rf "${pkgdir}"/usr/bin/tensorboard + + install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} + +package_tensorflow() { + cd "${srcdir}"/tensorflow-${_pkgver} + _package tmp +} + +package_tensorflow-opt() { + pkgdesc="Library for computation using data flow graphs for scalable machine learning (with AVX2 CPU optimizations)" + conflicts=(tensorflow) + provides=(tensorflow) + + cd "${srcdir}"/tensorflow-${_pkgver}-opt + _package tmpopt +} + +package_tensorflow-cuda() { + pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)" + depends+=(cuda cudnn nccl) + conflicts=(tensorflow) + provides=(tensorflow) + + cd "${srcdir}"/tensorflow-${_pkgver}-cuda + _package tmpcuda +} + +package_tensorflow-opt-cuda() { + pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and AVX2 CPU optimizations)" + depends+=(cuda cudnn nccl) + conflicts=(tensorflow) + provides=(tensorflow tensorflow-cuda) + + cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda + _package tmpoptcuda +} + +package_python-tensorflow() { + depends+=(tensorflow "${_common_py_depends[@]}") + + cd "${srcdir}"/tensorflow-${_pkgver} + _python_package tmp +} + +package_python-tensorflow-opt() { + pkgdesc="Library for computation using data flow graphs for scalable machine learning (with AVX2 CPU optimizations)" + depends+=(tensorflow-opt "${_common_py_depends[@]}") + conflicts=(python-tensorflow) + provides=(python-tensorflow) + + cd "${srcdir}"/tensorflow-${_pkgver}-opt + _python_package tmpopt +} + +package_python-tensorflow-cuda() { + pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)" + depends+=(tensorflow-cuda cuda cudnn nccl python-pycuda "${_common_py_depends[@]}") + conflicts=(python-tensorflow) + provides=(python-tensorflow) + + cd "${srcdir}"/tensorflow-${_pkgver}-cuda + _python_package tmpcuda +} + +package_python-tensorflow-opt-cuda() { + pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and AVX2 CPU optimizations)" + depends+=(tensorflow-opt-cuda cuda cudnn nccl python-pycuda "${_common_py_depends[@]}") + conflicts=(python-tensorflow) + provides=(python-tensorflow python-tensorflow-cuda) + + cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda + _python_package tmpoptcuda +} + +# vim:set ts=2 sw=2 et: Copied: tensorflow/repos/community-staging-x86_64/build-against-actual-mkl.patch (from rev 1054214, tensorflow/trunk/build-against-actual-mkl.patch) =================================================================== --- community-staging-x86_64/build-against-actual-mkl.patch (rev 0) +++ community-staging-x86_64/build-against-actual-mkl.patch 2021-11-22 06:55:53 UTC (rev 1054215) @@ -0,0 +1,37 @@ +diff --git a/third_party/mkl/build_defs.bzl b/third_party/mkl/build_defs.bzl +index 4b8fb83eb0..f4e1adfb22 100644 +--- a/third_party/mkl/build_defs.bzl ++++ b/third_party/mkl/build_defs.bzl +@@ -124,7 +124,7 @@ def _mkl_autoconf_impl(repository_ctx): + if _enable_local_mkl(repository_ctx): + # Symlink lib and include local folders. + mkl_root = repository_ctx.os.environ[_TF_MKL_ROOT] +- mkl_lib_path = "%s/lib" % mkl_root ++ mkl_lib_path = "%s/lib/intel64" % mkl_root + repository_ctx.symlink(mkl_lib_path, "lib") + mkl_include_path = "%s/include" % mkl_root + repository_ctx.symlink(mkl_include_path, "include") +diff --git a/third_party/mkl/mkl.BUILD b/third_party/mkl/mkl.BUILD +index 72370182c4..4972bb005e 100644 +--- a/third_party/mkl/mkl.BUILD ++++ b/third_party/mkl/mkl.BUILD +@@ -5,7 +5,6 @@ exports_files(["license.txt"]) + filegroup( + name = "LICENSE", + srcs = [ +- "license.txt", + ], + visibility = ["//visibility:public"], + ) +@@ -21,7 +20,10 @@ cc_library( + name = "mkl_libs_linux", + srcs = [ + "lib/libiomp5.so", +- "lib/libmklml_intel.so", ++ "lib/libmkl_core.so", ++ "lib/libmkl_rt.so", ++ "lib/libmkl_intel_thread.so", ++ "lib/libmkl_intel_lp64.so", + ], + visibility = ["//visibility:public"], + ) Copied: tensorflow/repos/community-staging-x86_64/fix-c++17-compat.patch (from rev 1054214, tensorflow/trunk/fix-c++17-compat.patch) =================================================================== --- community-staging-x86_64/fix-c++17-compat.patch (rev 0) +++ community-staging-x86_64/fix-c++17-compat.patch 2021-11-22 06:55:53 UTC (rev 1054215) @@ -0,0 +1,11 @@ +--- config-old.h 2021-06-13 04:22:15.841839739 +0200 ++++ config.h 2021-06-13 04:22:32.308939638 +0200 +@@ -533,7 +533,7 @@ + #ifdef __has_include + #if __has_include(<string_view>) && defined(__cplusplus) && \ + __cplusplus >= 201703L +-#define ABSL_HAVE_STD_STRING_VIEW 1 ++// #define ABSL_HAVE_STD_STRING_VIEW 1 + #endif + #endif + Copied: tensorflow/repos/community-staging-x86_64/openssl-1.1.patch (from rev 1054214, tensorflow/trunk/openssl-1.1.patch) =================================================================== --- community-staging-x86_64/openssl-1.1.patch (rev 0) +++ community-staging-x86_64/openssl-1.1.patch 2021-11-22 06:55:53 UTC (rev 1054215) @@ -0,0 +1,24 @@ +diff --git a/tensorflow/core/platform/s3/aws_crypto.cc b/tensorflow/core/platform/s3/aws_crypto.cc +index 6a473027..2fe87675 100644 +--- a/tensorflow/core/platform/s3/aws_crypto.cc ++++ b/tensorflow/core/platform/s3/aws_crypto.cc +@@ -35,14 +35,13 @@ class AWSSha256HMACOpenSSLImpl : public Aws::Utils::Crypto::HMAC { + Aws::Utils::ByteBuffer digest(length); + memset(digest.GetUnderlyingData(), 0, length); + +- HMAC_CTX ctx; +- HMAC_CTX_init(&ctx); ++ HMAC_CTX * ctx = HMAC_CTX_new(); + +- HMAC_Init_ex(&ctx, secret.GetUnderlyingData(), ++ HMAC_Init_ex(ctx, secret.GetUnderlyingData(), + static_cast<int>(secret.GetLength()), EVP_sha256(), NULL); +- HMAC_Update(&ctx, toSign.GetUnderlyingData(), toSign.GetLength()); +- HMAC_Final(&ctx, digest.GetUnderlyingData(), &length); +- HMAC_CTX_cleanup(&ctx); ++ HMAC_Update(ctx, toSign.GetUnderlyingData(), toSign.GetLength()); ++ HMAC_Final(ctx, digest.GetUnderlyingData(), &length); ++ HMAC_CTX_free(ctx); + + return Aws::Utils::Crypto::HashResult(std::move(digest)); + } Copied: tensorflow/repos/community-staging-x86_64/test.py (from rev 1054214, tensorflow/trunk/test.py) =================================================================== --- community-staging-x86_64/test.py (rev 0) +++ community-staging-x86_64/test.py 2021-11-22 06:55:53 UTC (rev 1054215) @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +import tensorflow as tf + +with tf.device("/GPU:0"): + a = tf.random.normal([1, 2]) + + +def temp(x): + return tf.shape(x)[0] + +tf.autograph.to_graph(temp)