[arch-commits] Commit in tensorflow/trunk (48935.patch PKGBUILD)

Konstantin Gizdov kgizdov at archlinux.org
Fri Jun 25 22:42:01 UTC 2021


    Date: Friday, June 25, 2021 @ 22:42:01
  Author: kgizdov
Revision: 967470

upgpkg: tensorflow 2.5.0-4: new style CUDA compute string and add latest PTX version for future compat

Added:
  tensorflow/trunk/48935.patch
Modified:
  tensorflow/trunk/PKGBUILD

-------------+
 48935.patch |  432 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD    |   13 +
 2 files changed, 441 insertions(+), 4 deletions(-)

Added: 48935.patch
===================================================================
--- 48935.patch	                        (rev 0)
+++ 48935.patch	2021-06-25 22:42:01 UTC (rev 967470)
@@ -0,0 +1,432 @@
+From 0f8fde42d09b199d02cf5d9d79fe76ebf1d260ef Mon Sep 17 00:00:00 2001
+From: Ben Greiner <code at bnavigator.de>
+Date: Thu, 6 May 2021 12:13:40 +0200
+Subject: [PATCH 1/7] 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 <code at bnavigator.de>
+Date: Thu, 6 May 2021 12:34:12 +0200
+Subject: [PATCH 2/7] 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 <code at bnavigator.de>
+Date: Thu, 6 May 2021 12:38:22 +0200
+Subject: [PATCH 3/7] 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 444840954cab9fda8be108e83af74d6a79e395b9 Mon Sep 17 00:00:00 2001
+From: Ben Greiner <code at bnavigator.de>
+Date: Thu, 17 Jun 2021 11:44:08 +0200
+Subject: [PATCH 7/7] 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)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-25 22:13:04 UTC (rev 967469)
+++ PKGBUILD	2021-06-25 22:42:01 UTC (rev 967470)
@@ -7,7 +7,7 @@
 pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda python-tensorflow python-tensorflow-opt python-tensorflow-cuda python-tensorflow-opt-cuda)
 pkgver=2.5.0
 _pkgver=2.5.0
-pkgrel=3
+pkgrel=4
 pkgdesc="Library for computation using data flow graphs for scalable machine learning"
 url="https://www.tensorflow.org/"
 license=('APACHE')
@@ -19,11 +19,11 @@
              'cython')
 optdepends=('tensorboard: Tensorflow visualization toolkit')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
-        https://patch-diff.githubusercontent.com/raw/tensorflow/tensorflow/pull/48935.patch
+        48935.patch
         fix-c++17-compat.patch
         build-against-actual-mkl.patch)
 sha512sums=('637c63b1bed1c0eb7bb018f1ff7f29f7f0d78e75dac384df4ecb5dfb92bbcb28209e3d3d2204145abddf88e3247d8c31bbb4cea032a73b7122b2ef3eb0d2b947'
-            '164a9213ffd8c7047a6a03022a3d768736ff3245871fcddb70e9bac8b57922f6dabf369a112d599465884e966ce5499040c6b041e216a7675f27c174e4f8c0ee'
+            '6dab3966de6e8065a3aa91575976df9593b56c7f347f5ef45cc791a4427b4569cde0b772ca6060f229d4e97ce637a69b04346a347c23cdc63420d8226da313ab'
             'a39f4adff91a60b05c18c4c1ef99b65375887bbea5991610eb162a3c6e3562f8d4438f9f1e1910b672f6094235b5b70dea633578f7f6b5b931f221ca2805152a'
             'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08')
 
@@ -63,6 +63,8 @@
   # See https://github.com/intel/mkl-dnn/issues/102
   # MKLML version that Tensorflow wants to use is https://github.com/intel/mkl-dnn/releases/tag/v0.21
   # patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/build-against-actual-mkl.patch
+
+  # https://github.com/tensorflow/tensorflow/pull/48935/files
   patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/48935.patch
 
   # Get rid of hardcoded versions. Not like we ever cared about what upstream
@@ -108,7 +110,10 @@
   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)
-  export TF_CUDA_COMPUTE_CAPABILITIES=5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5,8.0,8.6
+  # 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-10
   export CXX=g++-10




More information about the arch-commits mailing list