[arch-commits] Commit in tensorflow/trunk (3 files)

Sven-Hendrik Haase svenstaro at archlinux.org
Mon Mar 23 13:11:59 UTC 2020


    Date: Monday, March 23, 2020 @ 13:11:59
  Author: svenstaro
Revision: 603717

upgpkg: tensorflow 2.2.0rc1-1

Modified:
  tensorflow/trunk/PKGBUILD
Deleted:
  tensorflow/trunk/Add-grpc-fix-for-gettid.patch
  tensorflow/trunk/f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch

------------------------------------------------+
 Add-grpc-fix-for-gettid.patch                  |  113 --------------------
 PKGBUILD                                       |   24 +---
 f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch |  128 -----------------------
 3 files changed, 8 insertions(+), 257 deletions(-)

Deleted: Add-grpc-fix-for-gettid.patch
===================================================================
--- Add-grpc-fix-for-gettid.patch	2020-03-23 12:22:24 UTC (rev 603716)
+++ Add-grpc-fix-for-gettid.patch	2020-03-23 13:11:59 UTC (rev 603717)
@@ -1,113 +0,0 @@
-From e50d1fa554154b7e398ef7a0357f646e22cd51cf Mon Sep 17 00:00:00 2001
-From: Jianjun Liu <jianjun.liu at intel.com>
-Date: Thu, 29 Aug 2019 14:56:13 +0800
-Subject: [PATCH] Add grpc fix for gettid
-
-Add gettid fix on gettid conflict because of glibc
-
-Signed-off-by: Jianjun Liu <jianjun.liu at intel.com>
----
- tensorflow/workspace.bzl                  |  1 +
- third_party/Rename-gettid-functions.patch | 78 +++++++++++++++++++++++
- 2 files changed, 79 insertions(+)
- create mode 100644 third_party/Rename-gettid-functions.patch
-
-diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
-index 55d7eb93..33e86087 100755
---- a/tensorflow/workspace.bzl
-+++ b/tensorflow/workspace.bzl
-@@ -486,6 +486,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
-     # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule
-     tf_http_archive(
-         name = "grpc",
-+	patch_file = clean_dep("//third_party:Rename-gettid-functions.patch"),
-         sha256 = "67a6c26db56f345f7cee846e681db2c23f919eba46dd639b09462d1b6203d28c",
-         strip_prefix = "grpc-4566c2a29ebec0835643b972eb99f4306c4234a3",
-         system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
-diff --git a/third_party/Rename-gettid-functions.patch b/third_party/Rename-gettid-functions.patch
-new file mode 100644
-index 00000000..90bd9115
---- /dev/null
-+++ b/third_party/Rename-gettid-functions.patch
-@@ -0,0 +1,78 @@
-+From d1d017390b799c59d6fdf7b8afa6136d218bdd61 Mon Sep 17 00:00:00 2001
-+From: Benjamin Peterson <benjamin at dropbox.com>
-+Date: Fri, 3 May 2019 08:11:00 -0700
-+Subject: [PATCH] Rename gettid() functions.
-+
-+glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts.
-+---
-+ src/core/lib/gpr/log_linux.cc          | 4 ++--
-+ src/core/lib/gpr/log_posix.cc          | 4 ++--
-+ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++--
-+ 3 files changed, 6 insertions(+), 6 deletions(-)
-+
-+diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
-+index 561276f0c20..8b597b4cf2f 100644
-+--- a/src/core/lib/gpr/log_linux.cc
-++++ b/src/core/lib/gpr/log_linux.cc
-+@@ -40,7 +40,7 @@
-+ #include <time.h>
-+ #include <unistd.h>
-+ 
-+-static long gettid(void) { return syscall(__NR_gettid); }
-++static long sys_gettid(void) { return syscall(__NR_gettid); }
-+ 
-+ void gpr_log(const char* file, int line, gpr_log_severity severity,
-+              const char* format, ...) {
-+@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) {
-+   gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
-+   struct tm tm;
-+   static __thread long tid = 0;
-+-  if (tid == 0) tid = gettid();
-++  if (tid == 0) tid = sys_gettid();
-+ 
-+   timer = static_cast<time_t>(now.tv_sec);
-+   final_slash = strrchr(args->file, '/');
-+diff --git a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc
-+index b6edc14ab6b..2f7c6ce3760 100644
-+--- a/src/core/lib/gpr/log_posix.cc
-++++ b/src/core/lib/gpr/log_posix.cc
-+@@ -31,7 +31,7 @@
-+ #include <string.h>
-+ #include <time.h>
-+ 
-+-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
-++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
-+ 
-+ void gpr_log(const char* file, int line, gpr_log_severity severity,
-+              const char* format, ...) {
-+@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) {
-+   char* prefix;
-+   gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]",
-+                gpr_log_severity_string(args->severity), time_buffer,
-+-               (int)(now.tv_nsec), gettid(), display_file, args->line);
-++               (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
-+ 
-+   fprintf(stderr, "%-70s %s\n", prefix, args->message);
-+   gpr_free(prefix);
-+diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
-+index 08116b3ab53..76f59844312 100644
-+--- a/src/core/lib/iomgr/ev_epollex_linux.cc
-++++ b/src/core/lib/iomgr/ev_epollex_linux.cc
-+@@ -1102,7 +1102,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
-+ }
-+ 
-+ #ifndef NDEBUG
-+-static long gettid(void) { return syscall(__NR_gettid); }
-++static long sys_gettid(void) { return syscall(__NR_gettid); }
-+ #endif
-+ 
-+ /* pollset->mu lock must be held by the caller before calling this.
-+@@ -1122,7 +1122,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
-+ #define WORKER_PTR (&worker)
-+ #endif
-+ #ifndef NDEBUG
-+-  WORKER_PTR->originator = gettid();
-++  WORKER_PTR->originator = sys_gettid();
-+ #endif
-+   if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
-+     gpr_log(GPR_INFO,
--- 
-2.22.0
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-23 12:22:24 UTC (rev 603716)
+++ PKGBUILD	2020-03-23 13:11:59 UTC (rev 603717)
@@ -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.1.0
-_pkgver=2.1.0
-pkgrel=4
+pkgver=2.2.0rc1
+_pkgver=2.2.0-rc1
+pkgrel=1
 pkgdesc="Library for computation using data flow graphs for scalable machine learning"
 url="https://www.tensorflow.org/"
 license=('APACHE')
@@ -19,13 +19,9 @@
 optdepends=('tensorboard: Tensorflow visualization toolkit'
             'python-pasta: tf_upgrade_v2 tool')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
-        Add-grpc-fix-for-gettid.patch
-        build-against-actual-mkl.patch
-        f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch)
-sha512sums=('6d09ba3c097e4b3d712e7164d649841572c418d56c207eea6d31e3b1851b84ce57e82801d9887d84cfd8fcf990a3ea4c4b4b05265f8d625509986412c230c3c6'
-            '64442ef4cf0527cc321b7425273fd998c8e961af0ffbf1bb0a401cdd9237e95cdcebd8c18416e02a5225fabfd53cf0b694a3486791fffbc3e472a8ffaa4b28ff'
-            'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08'
-            '7738f839ef6d9c875da631312e0e528918539a4111d308b3b04f556d7c074918b78fb863953ec43961074f5fdb896ab1f6954cde68b6260dc15c1972ef640618')
+        build-against-actual-mkl.patch)
+sha512sums=('eb3a4ddbe47ba7ef7c1585861bab376258569228bcc55898107b26fd07a5944d64c3cd40e77fbe04e7a1a99a309a2ca217ccdd267d9cdddd8fca05bd06ab5cb0'
+            'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08')
 
 get_pyver () {
   python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
@@ -44,10 +40,6 @@
   # Allow any bazel version
   echo "*" > tensorflow-${_pkgver}/.bazelversion
 
-  patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/Add-grpc-fix-for-gettid.patch
-
-  patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch
-
   # Tensorflow actually wants to build against a slimmed down version of Intel MKL called MKLML
   # 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
@@ -158,7 +150,7 @@
   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_core/include
+  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/
@@ -191,7 +183,7 @@
   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_core/include/
+  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}"

Deleted: f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch
===================================================================
--- f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch	2020-03-23 12:22:24 UTC (rev 603716)
+++ f99aebca5d0b916106d9e17b0c1ee7898d14abc9.patch	2020-03-23 13:11:59 UTC (rev 603717)
@@ -1,128 +0,0 @@
-From f99aebca5d0b916106d9e17b0c1ee7898d14abc9 Mon Sep 17 00:00:00 2001
-From: "A. Unique TensorFlower" <gardener at tensorflow.org>
-Date: Wed, 12 Feb 2020 14:07:48 -0800
-Subject: [PATCH] Migrate --incompatible_remap_main_repo for bazel 2.0
-
-Bazel 2.0 flipped --incompatible_remap_main_repo. The gist of it is that when referring to a target in the main repository from inside an external repository the target needs to be prefixed by the main repository name. In this case "@org_tensorflow". Else, it's assumed that one is referring to a target inside the external repo.
-
-PiperOrigin-RevId: 294752795
-Change-Id: Ic23d08f457b966e9a039152c5f8a550ba5a1978e
----
- .bazelrc                           |  2 --
- tensorflow/opensource_only.files   |  1 +
- third_party/llvm/BUILD             |  2 --
- third_party/mkl/build_defs.bzl     | 22 +++++++++++-----------
- third_party/mkl_dnn/build_defs.bzl |  4 ++--
- 5 files changed, 14 insertions(+), 17 deletions(-)
-
-diff --git a/tensorflow/opensource_only.files b/tensorflow/opensource_only.files
-index 988b3c9bb0413..5df80351a551c 100644
---- a/tensorflow/opensource_only.files
-+++ b/tensorflow/opensource_only.files
-@@ -116,6 +116,7 @@ tensorflow/third_party/mkl/MKL_LICENSE
- tensorflow/third_party/mkl/build_defs.bzl
- tensorflow/third_party/mkl/mkl.BUILD
- tensorflow/third_party/mkl_dnn/LICENSE
-+tensorflow/third_party/mkl_dnn/build_defs.bzl
- tensorflow/third_party/mkl_dnn/mkldnn.BUILD
- tensorflow/third_party/mpi/.gitignore
- tensorflow/third_party/nanopb.BUILD
-diff --git a/third_party/llvm/BUILD b/third_party/llvm/BUILD
-index 563f394b2769e..1a5634a62851c 100644
---- a/third_party/llvm/BUILD
-+++ b/third_party/llvm/BUILD
-@@ -1,5 +1,3 @@
--licenses(["notice"])
--
- py_binary(
-     name = "expand_cmake_vars",
-     srcs = ["expand_cmake_vars.py"],
-diff --git a/third_party/mkl/build_defs.bzl b/third_party/mkl/build_defs.bzl
-index 6f3e7c0b52d48..4b8fb83eb092c 100644
---- a/third_party/mkl/build_defs.bzl
-+++ b/third_party/mkl/build_defs.bzl
-@@ -25,7 +25,7 @@ def if_mkl(if_true, if_false = []):
-       a select evaluating to either if_true or if_false as appropriate.
-     """
-     return select({
--        str(Label("//third_party/mkl:build_with_mkl")): if_true,
-+        "@org_tensorflow//third_party/mkl:build_with_mkl": if_true,
-         "//conditions:default": if_false,
-     })
- 
-@@ -41,8 +41,8 @@ def if_mkl_ml(if_true, if_false = []):
-       a select evaluating to either if_true or if_false as appropriate.
-     """
-     return select({
--        str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_false,
--        str(Label("//third_party/mkl:build_with_mkl")): if_true,
-+        "@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_only": if_false,
-+        "@org_tensorflow//third_party/mkl:build_with_mkl": if_true,
-         "//conditions:default": if_false,
-     })
- 
-@@ -57,7 +57,7 @@ def if_mkl_ml_only(if_true, if_false = []):
-       a select evaluating to either if_true or if_false as appropriate.
-     """
-     return select({
--        str(Label("//third_party/mkl:build_with_mkl_ml_only")): if_true,
-+        "@org_tensorflow//third_party/mkl:build_with_mkl_ml_only": if_true,
-         "//conditions:default": if_false,
-     })
- 
-@@ -74,7 +74,7 @@ def if_mkl_lnx_x64(if_true, if_false = []):
-       a select evaluating to either if_true or if_false as appropriate.
-     """
-     return select({
--        str(Label("//third_party/mkl:build_with_mkl_lnx_x64")): if_true,
-+        "@org_tensorflow//third_party/mkl:build_with_mkl_lnx_x64": if_true,
-         "//conditions:default": if_false,
-     })
- 
-@@ -91,7 +91,7 @@ def if_enable_mkl(if_true, if_false = []):
-       A select evaluating to either if_true or if_false as appropriate.
-     """
-     return select({
--        str(Label("//third_party/mkl:enable_mkl")): if_true,
-+        "@org_tensorflow//third_party/mkl:enable_mkl": if_true,
-         "//conditions:default": if_false,
-     })
- 
-@@ -105,11 +105,11 @@ def mkl_deps():
-       inclusion in the deps attribute of rules.
-     """
-     return select({
--        str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): ["@mkl_dnn"],
--        str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_v1_only")): ["@mkl_dnn_v1//:mkl_dnn"],
--        str(Label("//third_party/mkl:build_with_mkl_ml_only")): ["//third_party/mkl:intel_binary_blob"],
--        str(Label("//third_party/mkl:build_with_mkl")): [
--            "//third_party/mkl:intel_binary_blob",
-+        "@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_only": ["@mkl_dnn"],
-+        "@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_v1_only": ["@mkl_dnn_v1//:mkl_dnn"],
-+        "@org_tensorflow//third_party/mkl:build_with_mkl_ml_only": ["@org_tensorflow//third_party/mkl:intel_binary_blob"],
-+        "@org_tensorflow//third_party/mkl:build_with_mkl": [
-+            "@org_tensorflow//third_party/mkl:intel_binary_blob",
-             "@mkl_dnn",
-         ],
-         "//conditions:default": [],
-diff --git a/third_party/mkl_dnn/build_defs.bzl b/third_party/mkl_dnn/build_defs.bzl
-index 384b528c2733a..af05333c94700 100644
---- a/third_party/mkl_dnn/build_defs.bzl
-+++ b/third_party/mkl_dnn/build_defs.bzl
-@@ -10,7 +10,7 @@ def if_mkl_open_source_only(if_true, if_false = []):
- 
-     """
-     return select({
--        str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_true,
-+        "@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_only": if_true,
-         "//conditions:default": if_false,
-     })
- 
-@@ -26,6 +26,6 @@ def if_mkl_v1_open_source_only(if_true, if_false = []):
- 
-     """
-     return select({
--        str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_v1_only")): if_true,
-+        "@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_v1_only": if_true,
-         "//conditions:default": if_false,
-     })



More information about the arch-commits mailing list