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

Sven-Hendrik Haase svenstaro at archlinux.org
Wed Sep 30 14:11:37 UTC 2020


    Date: Wednesday, September 30, 2020 @ 14:11:37
  Author: svenstaro
Revision: 714078

upgpkg: tensorflow 2.3.1-1

Added:
  tensorflow/trunk/cuda11.1.patch
Modified:
  tensorflow/trunk/PKGBUILD

----------------+
 PKGBUILD       |   17 +++++++++++------
 cuda11.1.patch |   21 +++++++++++++++++++++
 2 files changed, 32 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-30 13:46:39 UTC (rev 714077)
+++ PKGBUILD	2020-09-30 14:11:37 UTC (rev 714078)
@@ -5,9 +5,9 @@
 
 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.3.0
-_pkgver=2.3.0
-pkgrel=4
+pkgver=2.3.1
+_pkgver=2.3.1
+pkgrel=1
 pkgdesc="Library for computation using data flow graphs for scalable machine learning"
 url="https://www.tensorflow.org/"
 license=('APACHE')
@@ -20,9 +20,11 @@
 optdepends=('tensorboard: Tensorflow visualization toolkit')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
         numpy1.20.patch::https://github.com/tensorflow/tensorflow/commit/75ea0b31477d6ba9e990e296bbbd8ca4e7eebadf.patch
+        cuda11.1.patch
         build-against-actual-mkl.patch)
-sha512sums=('86aa087ea84dac1ecc1023b23a378100d41cc6778ccd20404a4b955fc67cef11b3dc08abcc5b88020124d221e6fb172b33bd5206e9c9db6bc8fbeed399917eac'
+sha512sums=('e497ef4564f50abf9f918be4522cf702f4cf945cb1ebf83af1386ac4ddc7373b3ba70c7f803f8ca06faf2c6b5396e60b1e0e9b97bfbd667e733b08b6e6d70ef0'
             'df2e0373e2f63b8766f31933f7db57f6a7559b8f03af1db51644fba87731451a7cd3895529a3192e5394612fcb42f245b794b1c9ca3c05881ca03a547c8c9acc'
+            '8e9c6fae8b7ac8ad6640e9306a60b194987bcb3744d3d1e2c96cb6905016d9271f885d36a87f78ee158cf42fd9dd6257c2effcd4c9c567da3012e5462916ad16'
             'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08')
 
 get_pyver () {
@@ -47,6 +49,9 @@
   # 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
 
@@ -91,13 +96,13 @@
   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
+  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
 
   # Required until https://github.com/tensorflow/tensorflow/issues/39467 is fixed.
   export CC=gcc-9
   export CXX=g++-9
 
-export BAZEL_ARGS="--config=mkl -c opt --copt=-I/usr/include/openssl-1.0 --host_copt=-I/usr/include/openssl-1.0 --linkopt=-l:libssl.so.1.0.0 --linkopt=-l:libcrypto.so.1.0.0 --host_linkopt=-l:libssl.so.1.0.0 --host_linkopt=-l:libcrypto.so.1.0.0"
+  export BAZEL_ARGS="--config=mkl -c opt --copt=-I/usr/include/openssl-1.0 --host_copt=-I/usr/include/openssl-1.0 --linkopt=-l:libssl.so.1.0.0 --linkopt=-l:libcrypto.so.1.0.0 --host_linkopt=-l:libssl.so.1.0.0 --host_linkopt=-l:libcrypto.so.1.0.0"
 }
 
 build() {

Added: cuda11.1.patch
===================================================================
--- cuda11.1.patch	                        (rev 0)
+++ cuda11.1.patch	2020-09-30 14:11:37 UTC (rev 714078)
@@ -0,0 +1,21 @@
+diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
+index ea33963fe1..3ec6b0efa8 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,
++            "11.0",
+             static = False,
+         ),
+         "cudart_static": _check_cuda_lib_params(
+             "cudart_static",
+             cpu_value,
+             cuda_config.config["cuda_library_dir"],
+-            cuda_config.cuda_version,
++            "11.0",
+             static = True,
+         ),
+         "cublas": _check_cuda_lib_params(



More information about the arch-commits mailing list