[arch-commits] Commit in tensorflow/trunk (PKGBUILD cuda11.1.patch)
Sven-Hendrik Haase
svenstaro at archlinux.org
Sat Dec 12 14:49:59 UTC 2020
Date: Saturday, December 12, 2020 @ 14:49:58
Author: svenstaro
Revision: 773280
upgpkg: tensorflow 2.4.0rc4-2: Depend on python-gast03
Also clean up lots of old patches.
Modified:
tensorflow/trunk/PKGBUILD
Deleted:
tensorflow/trunk/cuda11.1.patch
----------------+
PKGBUILD | 23 ++-------
cuda11.1.patch | 136 -------------------------------------------------------
2 files changed, 5 insertions(+), 154 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-12-12 14:01:17 UTC (rev 773279)
+++ PKGBUILD 2020-12-12 14:49:58 UTC (rev 773280)
@@ -19,17 +19,9 @@
'cython')
optdepends=('tensorboard: Tensorflow visualization toolkit')
source=("$pkgname-$pkgver.tar.gz::https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
- https://github.com/tensorflow/tensorflow/commit/c6769e20bf6096d5828e2590def2b25edb3189d6.patch
- https://patch-diff.githubusercontent.com/raw/tensorflow/tensorflow/pull/44282.patch
- numpy1.20.patch::https://github.com/tensorflow/tensorflow/commit/75ea0b31477d6ba9e990e296bbbd8ca4e7eebadf.patch
- cuda11.1.patch
fix-h5py3.0.patch
build-against-actual-mkl.patch)
sha512sums=('fe69642a5cd0a6f7e8ae7abb93dec06225958d02f037936421a2b0c75bfc7d99efd5e1c6e0e3c2d0a6d3404516f4d178349d1fa88d81a14adb65d027339cb237'
- '9dcaef0dd4fdd7008a27e383ef87c97990ba883a3094f214f821a039994933ec6ec47f5a832570e5c4b783e0493ce2236e7957e596395c4dee40f9bf2621ff2f'
- '86345e25a3d9fad2c3ddab2be25b45b1fb9739b3bf45ba551eefa4f75d7eda6287064724539e7944f99f050676cd3d43cd5c6b60ab376bb6891dabfc2d96ff2d'
- 'df2e0373e2f63b8766f31933f7db57f6a7559b8f03af1db51644fba87731451a7cd3895529a3192e5394612fcb42f245b794b1c9ca3c05881ca03a547c8c9acc'
- '0caa5170c22fdea2c708ecdb2c980d668464d9dba9c9730a9ec5e9258572576d783fa1d19da04d5f9d2b06aed36d30971526f212fc64c53d09c3e821bd1a3b5d'
'9d7b71fed280ffaf4dfcd4889aa9ab5471874c153259f3e77ed6e6efa745e5c5aa8507d3d1f71dead5b6f4bea5f8b1c10c543929f37a6580c3f4a7cbec338a6a'
'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08')
@@ -55,16 +47,11 @@
# 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
- # Fix wrong SONAME being shipped in CUDA 11.1
- # patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/cuda11.1.patch
-
# Compile with C++17 by default (FS#65953)
#sed -i "s/c++14/c++17/g" tensorflow-${_pkgver}/.bazelrc
- # patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/numpy1.20.patch
-
# FS#68488
- # patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/fix-h5py3.0.patch
+ patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/fix-h5py3.0.patch
# Get rid of hardcoded versions. Not like we ever cared about what upstream
# thinks about which versions should be used anyway. ;) (FS#68772)
@@ -275,7 +262,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 python-opt_einsum python-astunparse python-pasta python-flatbuffers)
+ depends+=(tensorflow python-termcolor python-astor python-gast03 python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator python-opt_einsum python-astunparse python-pasta python-flatbuffers)
cd "${srcdir}"/tensorflow-${_pkgver}
_python_package tmp
@@ -283,7 +270,7 @@
package_python-tensorflow-opt() {
pkgdesc="Library for computation using data flow graphs for scalable machine learning (with AVX2 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 python-opt_einsum python-astunparse python-pasta python-flatbuffers)
+ depends+=(tensorflow-opt python-termcolor python-astor python-gast03 python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator python-opt_einsum python-astunparse python-pasta python-flatbuffers)
conflicts=(python-tensorflow)
provides=(python-tensorflow)
@@ -293,7 +280,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 python-opt_einsum python-astunparse python-pasta python-flatbuffers)
+ depends+=(tensorflow-cuda python-termcolor python-astor python-gast03 python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator python-opt_einsum python-astunparse python-pasta python-flatbuffers)
conflicts=(python-tensorflow)
provides=(python-tensorflow)
@@ -303,7 +290,7 @@
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 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 python-opt_einsum python-astunparse python-pasta python-flatbuffers)
+ depends+=(tensorflow-opt-cuda python-termcolor python-astor python-gast03 python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator python-opt_einsum python-astunparse python-pasta python-flatbuffers)
conflicts=(python-tensorflow)
provides=(python-tensorflow python-tensorflow-cuda)
Deleted: cuda11.1.patch
===================================================================
--- cuda11.1.patch 2020-12-12 14:01:17 UTC (rev 773279)
+++ cuda11.1.patch 2020-12-12 14:49:58 UTC (rev 773280)
@@ -1,136 +0,0 @@
-From 4a64bbe4ff9fb03a948ee76f7349cfdb9e9b7528 Mon Sep 17 00:00:00 2001
-From: Nathan Luehr <nluehr at nvidia.com>
-Date: Thu, 13 Aug 2020 09:46:43 -0700
-Subject: [PATCH 1/2] Fix cudart 11.1 soname
-
----
- third_party/gpus/cuda_configure.bzl | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
-index ea33963fe19fb..3e6bdc9d8eb22 100644
---- a/third_party/gpus/cuda_configure.bzl
-+++ b/third_party/gpus/cuda_configure.bzl
-@@ -534,14 +534,14 @@ def _find_libs(repository_ctx, check_cuda_libs_script, cuda_config):
- "cudart",
- cpu_value,
- cuda_config.config["cuda_library_dir"],
-- cuda_config.cuda_version,
-+ cuda_config.cudart_version,
- static = False,
- ),
- "cudart_static": _check_cuda_lib_params(
- "cudart_static",
- cpu_value,
- cuda_config.config["cuda_library_dir"],
-- cuda_config.cuda_version,
-+ cuda_config.cudart_version,
- static = True,
- ),
- "cublas": _check_cuda_lib_params(
-@@ -651,6 +651,7 @@ def _get_cuda_config(repository_ctx, find_cuda_config_script):
- cuda_toolkit_path: The CUDA toolkit installation directory.
- cudnn_install_basedir: The cuDNN installation directory.
- cuda_version: The version of CUDA on the system.
-+ cudart_version: The CUDA runtime version on the system.
- cudnn_version: The version of cuDNN on the system.
- compute_capabilities: A list of the system's CUDA compute capabilities.
- cpu_value: The name of the host operating system.
-@@ -668,6 +669,10 @@ def _get_cuda_config(repository_ctx, find_cuda_config_script):
- cudnn_version = ("64_%s" if is_windows else "%s") % config["cudnn_version"]
-
- if int(cuda_major) >= 11:
-+ if int(cuda_major) == 11:
-+ cudart_version = "64_110" if is_windows else "11.0"
-+ else:
-+ cudart_version = ("64_%s" if is_windows else "%s") % cuda_major
- cublas_version = ("64_%s" if is_windows else "%s") % config["cublas_version"].split(".")[0]
- cusolver_version = ("64_%s" if is_windows else "%s") % config["cusolver_version"].split(".")[0]
- curand_version = ("64_%s" if is_windows else "%s") % config["curand_version"].split(".")[0]
-@@ -677,12 +682,14 @@ def _get_cuda_config(repository_ctx, find_cuda_config_script):
- # cuda_lib_version is for libraries like cuBLAS, cuFFT, cuSOLVER, etc.
- # It changed from 'x.y' to just 'x' in CUDA 10.1.
- cuda_lib_version = ("64_%s" if is_windows else "%s") % cuda_major
-+ cudart_version = cuda_version
- cublas_version = cuda_lib_version
- cusolver_version = cuda_lib_version
- curand_version = cuda_lib_version
- cufft_version = cuda_lib_version
- cusparse_version = cuda_lib_version
- else:
-+ cudart_version = cuda_version
- cublas_version = cuda_version
- cusolver_version = cuda_version
- curand_version = cuda_version
-@@ -693,6 +700,7 @@ def _get_cuda_config(repository_ctx, find_cuda_config_script):
- cuda_toolkit_path = toolkit_path,
- cuda_version = cuda_version,
-+ cudart_version = cudart_version,
- cublas_version = cublas_version,
- cusolver_version = cusolver_version,
- curand_version = curand_version,
-
-From 2642e93e6cbb7a3a1e916abf1ab8e18fa2735237 Mon Sep 17 00:00:00 2001
-From: Nathan Luehr <nluehr at nvidia.com>
-Date: Fri, 14 Aug 2020 13:21:58 -0700
-Subject: [PATCH 2/2] Use correct cudart soname in GetDsoHandle
-
----
- tensorflow/stream_executor/platform/default/dso_loader.cc | 3 ++-
- third_party/gpus/cuda/cuda_config.h.tpl | 1 +
- third_party/gpus/cuda_configure.bzl | 2 ++
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/tensorflow/stream_executor/platform/default/dso_loader.cc b/tensorflow/stream_executor/platform/default/dso_loader.cc
-index 84293b7767a20..a78c738f32c2a 100644
---- a/tensorflow/stream_executor/platform/default/dso_loader.cc
-+++ b/tensorflow/stream_executor/platform/default/dso_loader.cc
-@@ -31,6 +31,7 @@ namespace internal {
-
- namespace {
- string GetCudaVersion() { return TF_CUDA_VERSION; }
-+string GetCudaRtVersion() { return TF_CUDART_VERSION; }
- string GetCudnnVersion() { return TF_CUDNN_VERSION; }
- string GetCublasVersion() { return TF_CUBLAS_VERSION; }
- string GetCusolverVersion() { return TF_CUSOLVER_VERSION; }
-@@ -77,7 +78,7 @@ port::StatusOr<void*> GetCudaDriverDsoHandle() {
- }
-
- port::StatusOr<void*> GetCudaRuntimeDsoHandle() {
-- return GetDsoHandle("cudart", GetCudaVersion());
-+ return GetDsoHandle("cudart", GetCudaRtVersion());
- }
-
- port::StatusOr<void*> GetCublasDsoHandle() {
-diff --git a/third_party/gpus/cuda/cuda_config.h.tpl b/third_party/gpus/cuda/cuda_config.h.tpl
-index b59889938b1a9..ab26686ccb8b2 100644
---- a/third_party/gpus/cuda/cuda_config.h.tpl
-+++ b/third_party/gpus/cuda/cuda_config.h.tpl
-@@ -17,6 +17,7 @@ limitations under the License.
- #define CUDA_CUDA_CONFIG_H_
-
- #define TF_CUDA_VERSION "%{cuda_version}"
-+#define TF_CUDART_VERSION "%{cudart_version}"
- #define TF_CUBLAS_VERSION "%{cublas_version}"
- #define TF_CUSOLVER_VERSION "%{cusolver_version}"
- #define TF_CURAND_VERSION "%{curand_version}"
-diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
-index 3e6bdc9d8eb22..f85a53b1593b4 100644
---- a/third_party/gpus/cuda_configure.bzl
-+++ b/third_party/gpus/cuda_configure.bzl
-@@ -824,6 +824,7 @@ filegroup(name="cudnn-include")
- "cuda:cuda_config.h",
- {
- "%{cuda_version}": "",
-+ "%{cudart_version}": "",
- "%{cublas_version}": "",
- "%{cusolver_version}": "",
- "%{curand_version}": "",
-@@ -1289,6 +1290,7 @@ def _create_local_cuda_repository(repository_ctx):
- tpl_paths["cuda:cuda_config.h"],
- {
- "%{cuda_version}": cuda_config.cuda_version,
-+ "%{cudart_version}": cuda_config.cudart_version,
- "%{cublas_version}": cuda_config.cublas_version,
- "%{cusolver_version}": cuda_config.cusolver_version,
- "%{curand_version}": cuda_config.curand_version,
More information about the arch-commits
mailing list