[arch-commits] Commit in tensorflow/repos/community-x86_64 (13 files)

Sven-Hendrik Haase svenstaro at archlinux.org
Mon Aug 13 17:07:03 UTC 2018


    Date: Monday, August 13, 2018 @ 17:07:03
  Author: svenstaro
Revision: 371311

archrelease: copy trunk to community-x86_64

Added:
  tensorflow/repos/community-x86_64/21017.patch
    (from rev 371310, tensorflow/trunk/21017.patch)
  tensorflow/repos/community-x86_64/PKGBUILD
    (from rev 371310, tensorflow/trunk/PKGBUILD)
  tensorflow/repos/community-x86_64/protobuf-python37-apply.patch
    (from rev 371310, tensorflow/trunk/protobuf-python37-apply.patch)
  tensorflow/repos/community-x86_64/protobuf-python37.patch
    (from rev 371310, tensorflow/trunk/protobuf-python37.patch)
  tensorflow/repos/community-x86_64/python37.patch
    (from rev 371310, tensorflow/trunk/python37.patch)
  tensorflow/repos/community-x86_64/update-cython.patch
    (from rev 371310, tensorflow/trunk/update-cython.patch)
  tensorflow/repos/community-x86_64/update-protobuf.patch
    (from rev 371310, tensorflow/trunk/update-protobuf.patch)
Deleted:
  tensorflow/repos/community-x86_64/PKGBUILD
  tensorflow/repos/community-x86_64/protobuf-python37-apply.patch
  tensorflow/repos/community-x86_64/protobuf-python37.patch
  tensorflow/repos/community-x86_64/python37.patch
  tensorflow/repos/community-x86_64/update-cython.patch
  tensorflow/repos/community-x86_64/update-protobuf.patch

-------------------------------+
 21017.patch                   |   21 +
 PKGBUILD                      |  477 +++++++++++++++++++---------------------
 protobuf-python37-apply.patch |   54 ++--
 protobuf-python37.patch       |  182 +++++++--------
 python37.patch                |  131 +++++-----
 update-cython.patch           |   68 ++---
 update-protobuf.patch         |  292 ++++++++++++------------
 7 files changed, 627 insertions(+), 598 deletions(-)

Copied: tensorflow/repos/community-x86_64/21017.patch (from rev 371310, tensorflow/trunk/21017.patch)
===================================================================
--- 21017.patch	                        (rev 0)
+++ 21017.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,21 @@
+From fb8d1ca4eaefe58d42c27b6fc676f64f137f4675 Mon Sep 17 00:00:00 2001
+From: Ray Kim <msca8h at naver.com>
+Date: Sat, 21 Jul 2018 21:42:15 +0900
+Subject: [PATCH] fixed build error on gcc-7
+
+---
+ tensorflow/compiler/xla/service/gpu/xfeed_queue.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tensorflow/compiler/xla/service/gpu/xfeed_queue.h b/tensorflow/compiler/xla/service/gpu/xfeed_queue.h
+index 737c7eb0253..dd46ff433ba 100644
+--- a/tensorflow/compiler/xla/service/gpu/xfeed_queue.h
++++ b/tensorflow/compiler/xla/service/gpu/xfeed_queue.h
+@@ -17,6 +17,7 @@ limitations under the License.
+ #define TENSORFLOW_COMPILER_XLA_SERVICE_GPU_XFEED_QUEUE_H_
+ 
+ #include <deque>
++#include <functional>
+ #include <vector>
+ 
+ #include "tensorflow/core/platform/mutex.h"

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-13 17:06:48 UTC (rev 371310)
+++ PKGBUILD	2018-08-13 17:07:03 UTC (rev 371311)
@@ -1,239 +0,0 @@
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
-# Contributor: Adria Arrufat (archdria) <adria.arrufat+AUR at protonmail.ch>
-# Contributor: Thibault Lorrain (fredszaq) <fredszaq at 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=1.9.0
-_pkgver=1.9.0
-pkgrel=3
-pkgdesc="Library for computation using data flow graphs for scalable machine learning"
-url="https://www.tensorflow.org/"
-license=('APACHE')
-arch=('x86_64')
-makedepends=('bazel' 'python-numpy' 'cuda' 'nvidia-utils'
-             'cudnn' 'python-pip' 'python-wheel' 'python-setuptools')
-optdepends=('tensorboard: Tensorflow visualization toolkit')
-source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
-        update-cython.patch
-        update-protobuf.patch
-        python37.patch
-        protobuf-python37.patch
-        protobuf-python37-apply.patch)
-sha512sums=('eb25dafccf2ec600c4ca28612362c8317b8b9160610ca9fb60f265815651c155b19ae5be3f213a0d9e716d9e25637d6502164433955247cf6fa5d75408b7ac84'
-            '4f91312e4744ed03bb5bdb7e2403a167d8cbb8e4ceb7a8ad062316609bb4988e28737131f2b5ffd115d8d8b4be90d8da1d186a61fe1d37b2b72cb5a91f6d77bc'
-            'e2433942d071862325b3c201a79239347ba30a664d86d27bbcccb6769ec914f0f4bd878986790512c8b7486d1ac1a72fe61f64357b74e52e7ec45188900efd6c'
-            '9e4af5901cdff1fe877f981721193cfe6bfdc0b059e970f33a4896c53118f1f3dc7bb26dc8f9064eba7a9ac7ada5cb32bb26fc90afb188c490abb4e4aab5179a'
-            'a248658d9466bd3aba854b429ce2c1981c5efff5196dead7b2a8c216b9a6cac781a9f487db5ff4513becc4e6d6cc14c494768a859e1f51a9eea848d8f0178204'
-            'fcff7163f6b979018ef4c09dc927ab8dc784b778d8a1bca6d986cc6797fa12f9b5cd902b344fd25c74ac13f71c022f515066d909d9b42e6c3be0ff214f1c7ca8')
-
-prepare() {
-  # https://github.com/tensorflow/tensorflow/issues/20517
-  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/update-cython.patch
-  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/python37.patch
-  # https://github.com/tensorflow/tensorflow/issues/20950
-  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/update-protobuf.patch
-  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/protobuf-python37-apply.patch
-  cp ${srcdir}/protobuf-python37.patch tensorflow-${_pkgver}/third_party/
-
-  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=0
-  export TF_NEED_OPENCL_SYCL=0
-  export TF_NEED_GCP=0
-  export TF_NEED_HDFS=0
-  export TF_NEED_S3=0
-  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_SET_ANDROID_WORKSPACE=0
-  export TF_DOWNLOAD_CLANG=0
-  export TF_NCCL_VERSION=1.3  # configure.py: _DEFAULT_NCCL_VERSION
-}
-
-build() {
-  cd ${srcdir}/tensorflow-${_pkgver}
-  export CC_OPT_FLAGS="-march=x86-64"
-  export TF_NEED_CUDA=0
-  ./configure
-  bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmp
-
-  cd ${srcdir}/tensorflow-${_pkgver}-cuda
-  export CC_OPT_FLAGS="-march=x86-64"
-  export TF_NEED_CUDA=1
-  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-7
-  export TF_CUDA_CLANG=0
-  # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
-  export CUDA_TOOLKIT_PATH=/opt/cuda
-  export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
-  export CUDNN_INSTALL_PATH=/opt/cuda
-  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h)
-  export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1,6.2,7.0
-  ./configure
-  bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcuda
-
-  cd ${srcdir}/tensorflow-${_pkgver}-opt
-  export CC_OPT_FLAGS="-march=haswell"
-  export TF_NEED_CUDA=0
-  ./configure
-  bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpopt
-
-  cd ${srcdir}/tensorflow-${_pkgver}-opt-cuda
-  export CC_OPT_FLAGS="-march=haswell"
-  export TF_NEED_CUDA=1
-  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-7
-  export TF_CUDA_CLANG=0
-  # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
-  export CUDA_TOOLKIT_PATH=/opt/cuda
-  export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
-  export CUDNN_INSTALL_PATH=/opt/cuda
-  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h)
-  export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1,6.2,7.0
-  ./configure
-  bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcudaopt
-}
-
-package_tensorflow() {
-  cd ${srcdir}/tensorflow-${_pkgver}
-
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_tensorflow-opt() {
-  conflicts=(tensorflow)
-  provides=(tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
-
-  cd ${srcdir}/tensorflow-${_pkgver}-opt
-
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_tensorflow-cuda() {
-  depends=(cuda cudnn)
-  conflicts=(tensorflow)
-  provides=(tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
-
-  cd ${srcdir}/tensorflow-${_pkgver}-cuda
-
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_tensorflow-opt-cuda() {
-  depends=(cuda cudnn)
-  conflicts=(tensorflow)
-  provides=(tensorflow tensorflow-cuda)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
-
-  cd ${srcdir}/tensorflow-${_pkgver}-opt-cuda
-
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_python-tensorflow() {
-  depends=(python-numpy python-protobuf absl-py)
-
-  cd ${srcdir}/tensorflow-${_pkgver}
-
-  WHEEL_PACKAGE=$(find ${srcdir}/tmp -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
-
-  # 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_python-tensorflow-opt() {
-  depends=(python-numpy python-protobuf absl-py)
-  conflicts=(python-tensorflow)
-  provides=(python-tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
-
-  cd ${srcdir}/tensorflow-${_pkgver}-opt
-
-  WHEEL_PACKAGE=$(find ${srcdir}/tmpopt -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
-
-  # 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_python-tensorflow-cuda() {
-  depends=(python-numpy cuda cudnn python-pycuda python-protobuf absl-py)
-  conflicts=(python-tensorflow)
-  provides=(python-tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
-
-  cd ${srcdir}/tensorflow-${_pkgver}-cuda
-
-  WHEEL_PACKAGE=$(find ${srcdir}/tmpcuda -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
-
-  # 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_python-tensorflow-opt-cuda() {
-  depends=(python-numpy cuda cudnn python-pycuda python-protobuf absl-py)
-  conflicts=(python-tensorflow)
-  provides=(python-tensorflow python-tensorflow-cuda)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
-
-  cd ${srcdir}/tensorflow-${_pkgver}-opt-cuda
-
-  WHEEL_PACKAGE=$(find ${srcdir}/tmpcudaopt -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
-
-  # 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
-}
-
-# vim:set ts=2 sw=2 et:

Copied: tensorflow/repos/community-x86_64/PKGBUILD (from rev 371310, tensorflow/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,238 @@
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: Adria Arrufat (archdria) <adria.arrufat+AUR at protonmail.ch>
+# Contributor: Thibault Lorrain (fredszaq) <fredszaq at 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=1.10.0
+_pkgver=1.10.0
+pkgrel=1
+pkgdesc="Library for computation using data flow graphs for scalable machine learning"
+url="https://www.tensorflow.org/"
+license=('APACHE')
+arch=('x86_64')
+makedepends=('bazel' 'python-numpy' 'cuda' 'nvidia-utils'
+             'cudnn' 'python-pip' 'python-wheel' 'python-setuptools')
+optdepends=('tensorboard: Tensorflow visualization toolkit')
+source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
+        python37.patch
+        protobuf-python37.patch
+        protobuf-python37-apply.patch
+        21017.patch)
+sha512sums=('a25257ad7e561c2040ba9dda699acb24b757e6d79c60324cab20d8d8a428fef79a06a3627a95a59e2c8408a094666b9aa6d8af1c5419fa8c238e1f5e10e9ec33'
+            '9e3954c10f9dc11d3b6a6a0162061511eaa81b934debaf4f159f11f60e235e6f2762a216d10927695497e8cf7065855d343cd1573727da3f6355e669ea7c6788'
+            'a248658d9466bd3aba854b429ce2c1981c5efff5196dead7b2a8c216b9a6cac781a9f487db5ff4513becc4e6d6cc14c494768a859e1f51a9eea848d8f0178204'
+            'fcff7163f6b979018ef4c09dc927ab8dc784b778d8a1bca6d986cc6797fa12f9b5cd902b344fd25c74ac13f71c022f515066d909d9b42e6c3be0ff214f1c7ca8'
+            '3125df6b51cc835c22733f187e3d3f85ee7016d3b1c254ee1fae339c493a988c0220ce3fbd473ac54f6983460dd0b0bc38fca2ee8e007d22b4e24c7f2539069f')
+
+prepare() {
+  # https://github.com/tensorflow/tensorflow/pull/21017
+  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/21017.patch
+  # https://github.com/tensorflow/tensorflow/issues/20517
+  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/python37.patch
+  # https://github.com/tensorflow/tensorflow/issues/20950
+  patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/protobuf-python37-apply.patch
+  cp ${srcdir}/protobuf-python37.patch tensorflow-${_pkgver}/third_party/
+
+  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=0
+  export TF_NEED_OPENCL_SYCL=0
+  export TF_NEED_AWS=0
+  export TF_NEED_GCP=0
+  export TF_NEED_HDFS=0
+  export TF_NEED_S3=0
+  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_SET_ANDROID_WORKSPACE=0
+  export TF_DOWNLOAD_CLANG=0
+  export TF_NCCL_VERSION=1.3  # configure.py: _DEFAULT_NCCL_VERSION
+}
+
+build() {
+  cd ${srcdir}/tensorflow-${_pkgver}
+  export CC_OPT_FLAGS="-march=x86-64"
+  export TF_NEED_CUDA=0
+  ./configure
+  bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmp
+
+  cd ${srcdir}/tensorflow-${_pkgver}-cuda
+  export CC_OPT_FLAGS="-march=x86-64"
+  export TF_NEED_CUDA=1
+  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-7
+  export TF_CUDA_CLANG=0
+  # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
+  export CUDA_TOOLKIT_PATH=/opt/cuda
+  export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
+  export CUDNN_INSTALL_PATH=/opt/cuda
+  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h)
+  export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1,6.2,7.0
+  ./configure
+  bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcuda
+
+  cd ${srcdir}/tensorflow-${_pkgver}-opt
+  export CC_OPT_FLAGS="-march=haswell"
+  export TF_NEED_CUDA=0
+  ./configure
+  bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpopt
+
+  cd ${srcdir}/tensorflow-${_pkgver}-opt-cuda
+  export CC_OPT_FLAGS="-march=haswell"
+  export TF_NEED_CUDA=1
+  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-7
+  export TF_CUDA_CLANG=0
+  # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
+  export CUDA_TOOLKIT_PATH=/opt/cuda
+  export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
+  export CUDNN_INSTALL_PATH=/opt/cuda
+  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h)
+  export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1,6.2,7.0
+  ./configure
+  bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcudaopt
+}
+
+package_tensorflow() {
+  cd ${srcdir}/tensorflow-${_pkgver}
+
+  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
+  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
+  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
+  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_tensorflow-opt() {
+  conflicts=(tensorflow)
+  provides=(tensorflow)
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
+
+  cd ${srcdir}/tensorflow-${_pkgver}-opt
+
+  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
+  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
+  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
+  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_tensorflow-cuda() {
+  depends=(cuda cudnn)
+  conflicts=(tensorflow)
+  provides=(tensorflow)
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
+
+  cd ${srcdir}/tensorflow-${_pkgver}-cuda
+
+  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
+  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
+  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
+  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_tensorflow-opt-cuda() {
+  depends=(cuda cudnn)
+  conflicts=(tensorflow)
+  provides=(tensorflow tensorflow-cuda)
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
+
+  cd ${srcdir}/tensorflow-${_pkgver}-opt-cuda
+
+  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
+  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so
+  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so ${pkgdir}/usr/lib/libtensorflow_framework.so
+  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_python-tensorflow() {
+  depends=(python-numpy python-protobuf absl-py)
+
+  cd ${srcdir}/tensorflow-${_pkgver}
+
+  WHEEL_PACKAGE=$(find ${srcdir}/tmp -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
+
+  # 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_python-tensorflow-opt() {
+  depends=(python-numpy python-protobuf absl-py)
+  conflicts=(python-tensorflow)
+  provides=(python-tensorflow)
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
+
+  cd ${srcdir}/tensorflow-${_pkgver}-opt
+
+  WHEEL_PACKAGE=$(find ${srcdir}/tmpopt -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
+
+  # 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_python-tensorflow-cuda() {
+  depends=(python-numpy cuda cudnn python-pycuda python-protobuf absl-py)
+  conflicts=(python-tensorflow)
+  provides=(python-tensorflow)
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
+
+  cd ${srcdir}/tensorflow-${_pkgver}-cuda
+
+  WHEEL_PACKAGE=$(find ${srcdir}/tmpcuda -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
+
+  # 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_python-tensorflow-opt-cuda() {
+  depends=(python-numpy cuda cudnn python-pycuda python-protobuf absl-py)
+  conflicts=(python-tensorflow)
+  provides=(python-tensorflow python-tensorflow-cuda)
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
+
+  cd ${srcdir}/tensorflow-${_pkgver}-opt-cuda
+
+  WHEEL_PACKAGE=$(find ${srcdir}/tmpcudaopt -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
+
+  # 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
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: protobuf-python37-apply.patch
===================================================================
--- protobuf-python37-apply.patch	2018-08-13 17:06:48 UTC (rev 371310)
+++ protobuf-python37-apply.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -1,27 +0,0 @@
-diff -upr tensorflow-1.9.0.orig/tensorflow/workspace.bzl tensorflow-1.9.0/tensorflow/workspace.bzl
---- tensorflow-1.9.0.orig/tensorflow/workspace.bzl	2018-07-30 13:22:06.387368887 +0300
-+++ tensorflow-1.9.0/tensorflow/workspace.bzl	2018-07-30 13:26:15.734924242 +0300
-@@ -335,6 +335,7 @@ def tf_workspace(path_prefix="", tf_repo
-       ],
-       sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
-       strip_prefix = "protobuf-3.6.0",
-+      patch_file = clean_dep("//third_party:protobuf-python37.patch"),
-   )
- 
-   # We need to import the protobuf library under the names com_google_protobuf
-@@ -348,6 +349,7 @@ def tf_workspace(path_prefix="", tf_repo
-       ],
-       sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
-       strip_prefix = "protobuf-3.6.0",
-+      patch_file = clean_dep("//third_party:protobuf-python37.patch"),
-   )
- 
-   tf_http_archive(
-@@ -358,6 +360,7 @@ def tf_workspace(path_prefix="", tf_repo
-       ],
-       sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
-       strip_prefix = "protobuf-3.6.0",
-+      patch_file = clean_dep("//third_party:protobuf-python37.patch"),
-   )
- 
-   tf_http_archive(

Copied: tensorflow/repos/community-x86_64/protobuf-python37-apply.patch (from rev 371310, tensorflow/trunk/protobuf-python37-apply.patch)
===================================================================
--- protobuf-python37-apply.patch	                        (rev 0)
+++ protobuf-python37-apply.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,27 @@
+diff -upr tensorflow-1.9.0.orig/tensorflow/workspace.bzl tensorflow-1.9.0/tensorflow/workspace.bzl
+--- tensorflow-1.9.0.orig/tensorflow/workspace.bzl	2018-07-30 13:22:06.387368887 +0300
++++ tensorflow-1.9.0/tensorflow/workspace.bzl	2018-07-30 13:26:15.734924242 +0300
+@@ -335,6 +335,7 @@ def tf_workspace(path_prefix="", tf_repo
+       ],
+       sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
+       strip_prefix = "protobuf-3.6.0",
++      patch_file = clean_dep("//third_party:protobuf-python37.patch"),
+   )
+ 
+   # We need to import the protobuf library under the names com_google_protobuf
+@@ -348,6 +349,7 @@ def tf_workspace(path_prefix="", tf_repo
+       ],
+       sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
+       strip_prefix = "protobuf-3.6.0",
++      patch_file = clean_dep("//third_party:protobuf-python37.patch"),
+   )
+ 
+   tf_http_archive(
+@@ -358,6 +360,7 @@ def tf_workspace(path_prefix="", tf_repo
+       ],
+       sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
+       strip_prefix = "protobuf-3.6.0",
++      patch_file = clean_dep("//third_party:protobuf-python37.patch"),
+   )
+ 
+   tf_http_archive(

Deleted: protobuf-python37.patch
===================================================================
--- protobuf-python37.patch	2018-08-13 17:06:48 UTC (rev 371310)
+++ protobuf-python37.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -1,91 +0,0 @@
-From 0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7 Mon Sep 17 00:00:00 2001
-From: Ben Webb <ben at salilab.org>
-Date: Thu, 12 Jul 2018 10:58:10 -0700
-Subject: [PATCH] Add Python 3.7 compatibility (#4862)
-
-Compilation of Python wrappers fails with Python 3.7 because
-the Python folks changed their C API such that
-PyUnicode_AsUTF8AndSize() now returns a const char* rather
-than a char*. Add a patch to work around. Relates #4086.
----
- python/google/protobuf/pyext/descriptor.cc            | 2 +-
- python/google/protobuf/pyext/descriptor_containers.cc | 2 +-
- python/google/protobuf/pyext/descriptor_pool.cc       | 2 +-
- python/google/protobuf/pyext/extension_dict.cc        | 2 +-
- python/google/protobuf/pyext/message.cc               | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/python/google/protobuf/pyext/descriptor.cc b/python/google/protobuf/pyext/descriptor.cc
-index 8af0cb1289..19a1c38a62 100644
---- a/python/google/protobuf/pyext/descriptor.cc
-+++ b/python/google/protobuf/pyext/descriptor.cc
-@@ -56,7 +56,7 @@
-   #endif
-   #define PyString_AsStringAndSize(ob, charpp, sizep) \
-     (PyUnicode_Check(ob)? \
--       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
-+       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
-        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
- #endif
- 
-diff --git a/python/google/protobuf/pyext/descriptor_containers.cc b/python/google/protobuf/pyext/descriptor_containers.cc
-index bc007f7efa..0153664f50 100644
---- a/python/google/protobuf/pyext/descriptor_containers.cc
-+++ b/python/google/protobuf/pyext/descriptor_containers.cc
-@@ -66,7 +66,7 @@
-   #endif
-   #define PyString_AsStringAndSize(ob, charpp, sizep) \
-     (PyUnicode_Check(ob)? \
--       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
-+       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
-        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
- #endif
- 
-diff --git a/python/google/protobuf/pyext/descriptor_pool.cc b/python/google/protobuf/pyext/descriptor_pool.cc
-index 95882aeb35..962accc6e9 100644
---- a/python/google/protobuf/pyext/descriptor_pool.cc
-+++ b/python/google/protobuf/pyext/descriptor_pool.cc
-@@ -48,7 +48,7 @@
-   #endif
-   #define PyString_AsStringAndSize(ob, charpp, sizep) \
-     (PyUnicode_Check(ob)? \
--       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
-+       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
-        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
- #endif
- 
-diff --git a/python/google/protobuf/pyext/extension_dict.cc b/python/google/protobuf/pyext/extension_dict.cc
-index 018b5c2c49..174c5470c2 100644
---- a/python/google/protobuf/pyext/extension_dict.cc
-+++ b/python/google/protobuf/pyext/extension_dict.cc
-@@ -53,7 +53,7 @@
-   #endif
-   #define PyString_AsStringAndSize(ob, charpp, sizep) \
-     (PyUnicode_Check(ob)? \
--       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
-+       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
-        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
- #endif
- 
-diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc
-index 53736b9c9f..b2984509dd 100644
---- a/python/google/protobuf/pyext/message.cc
-+++ b/python/google/protobuf/pyext/message.cc
-@@ -79,7 +79,7 @@
-     (PyUnicode_Check(ob)? PyUnicode_AsUTF8(ob): PyBytes_AsString(ob))
-   #define PyString_AsStringAndSize(ob, charpp, sizep) \
-     (PyUnicode_Check(ob)? \
--       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
-+       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
-        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
-   #endif
- #endif
-@@ -1529,7 +1529,7 @@ PyObject* HasField(CMessage* self, PyObject* arg) {
-     return NULL;
-   }
- #else
--  field_name = PyUnicode_AsUTF8AndSize(arg, &size);
-+  field_name = const_cast<char*>(PyUnicode_AsUTF8AndSize(arg, &size));
-   if (!field_name) {
-     return NULL;
-   }

Copied: tensorflow/repos/community-x86_64/protobuf-python37.patch (from rev 371310, tensorflow/trunk/protobuf-python37.patch)
===================================================================
--- protobuf-python37.patch	                        (rev 0)
+++ protobuf-python37.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,91 @@
+From 0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7 Mon Sep 17 00:00:00 2001
+From: Ben Webb <ben at salilab.org>
+Date: Thu, 12 Jul 2018 10:58:10 -0700
+Subject: [PATCH] Add Python 3.7 compatibility (#4862)
+
+Compilation of Python wrappers fails with Python 3.7 because
+the Python folks changed their C API such that
+PyUnicode_AsUTF8AndSize() now returns a const char* rather
+than a char*. Add a patch to work around. Relates #4086.
+---
+ python/google/protobuf/pyext/descriptor.cc            | 2 +-
+ python/google/protobuf/pyext/descriptor_containers.cc | 2 +-
+ python/google/protobuf/pyext/descriptor_pool.cc       | 2 +-
+ python/google/protobuf/pyext/extension_dict.cc        | 2 +-
+ python/google/protobuf/pyext/message.cc               | 4 ++--
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/python/google/protobuf/pyext/descriptor.cc b/python/google/protobuf/pyext/descriptor.cc
+index 8af0cb1289..19a1c38a62 100644
+--- a/python/google/protobuf/pyext/descriptor.cc
++++ b/python/google/protobuf/pyext/descriptor.cc
+@@ -56,7 +56,7 @@
+   #endif
+   #define PyString_AsStringAndSize(ob, charpp, sizep) \
+     (PyUnicode_Check(ob)? \
+-       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+ 
+diff --git a/python/google/protobuf/pyext/descriptor_containers.cc b/python/google/protobuf/pyext/descriptor_containers.cc
+index bc007f7efa..0153664f50 100644
+--- a/python/google/protobuf/pyext/descriptor_containers.cc
++++ b/python/google/protobuf/pyext/descriptor_containers.cc
+@@ -66,7 +66,7 @@
+   #endif
+   #define PyString_AsStringAndSize(ob, charpp, sizep) \
+     (PyUnicode_Check(ob)? \
+-       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+ 
+diff --git a/python/google/protobuf/pyext/descriptor_pool.cc b/python/google/protobuf/pyext/descriptor_pool.cc
+index 95882aeb35..962accc6e9 100644
+--- a/python/google/protobuf/pyext/descriptor_pool.cc
++++ b/python/google/protobuf/pyext/descriptor_pool.cc
+@@ -48,7 +48,7 @@
+   #endif
+   #define PyString_AsStringAndSize(ob, charpp, sizep) \
+     (PyUnicode_Check(ob)? \
+-       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+ 
+diff --git a/python/google/protobuf/pyext/extension_dict.cc b/python/google/protobuf/pyext/extension_dict.cc
+index 018b5c2c49..174c5470c2 100644
+--- a/python/google/protobuf/pyext/extension_dict.cc
++++ b/python/google/protobuf/pyext/extension_dict.cc
+@@ -53,7 +53,7 @@
+   #endif
+   #define PyString_AsStringAndSize(ob, charpp, sizep) \
+     (PyUnicode_Check(ob)? \
+-       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+ 
+diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc
+index 53736b9c9f..b2984509dd 100644
+--- a/python/google/protobuf/pyext/message.cc
++++ b/python/google/protobuf/pyext/message.cc
+@@ -79,7 +79,7 @@
+     (PyUnicode_Check(ob)? PyUnicode_AsUTF8(ob): PyBytes_AsString(ob))
+   #define PyString_AsStringAndSize(ob, charpp, sizep) \
+     (PyUnicode_Check(ob)? \
+-       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+   #endif
+ #endif
+@@ -1529,7 +1529,7 @@ PyObject* HasField(CMessage* self, PyObject* arg) {
+     return NULL;
+   }
+ #else
+-  field_name = PyUnicode_AsUTF8AndSize(arg, &size);
++  field_name = const_cast<char*>(PyUnicode_AsUTF8AndSize(arg, &size));
+   if (!field_name) {
+     return NULL;
+   }

Deleted: python37.patch
===================================================================
--- python37.patch	2018-08-13 17:06:48 UTC (rev 371310)
+++ python37.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -1,61 +0,0 @@
-diff --git a/tensorflow/c/eager/c_api.h b/tensorflow/c/eager/c_api.h
-index 1862af3ce2..093b97110f 100644
---- a/tensorflow/c/eager/c_api.h
-+++ b/tensorflow/c/eager/c_api.h
-@@ -76,7 +76,7 @@ typedef enum TFE_ContextDevicePlacementPolicy {
- // Sets the default execution mode (sync/async). Note that this can be
- // overridden per thread using TFE_ContextSetAsyncForThread.
- TF_CAPI_EXPORT extern void TFE_ContextOptionsSetAsync(TFE_ContextOptions*,
--                                                      unsigned char async);
-+                                                      unsigned char is_async);
- 
- TF_CAPI_EXPORT extern void TFE_ContextOptionsSetDevicePlacementPolicy(
-     TFE_ContextOptions*, TFE_ContextDevicePlacementPolicy);
-@@ -125,7 +125,7 @@ TFE_ContextGetDevicePlacementPolicy(TFE_Context*);
- 
- // Overrides the execution mode (sync/async) for the current thread.
- TF_CAPI_EXPORT extern void TFE_ContextSetAsyncForThread(TFE_Context*,
--                                                        unsigned char async,
-+                                                        unsigned char is_async,
-                                                         TF_Status* status);
- 
- // Causes the calling thread to block till all ops dispatched in async mode
-diff --git a/tensorflow/python/eager/pywrap_tfe_src.cc b/tensorflow/python/eager/pywrap_tfe_src.cc
-index 6c9481c3af..13edbb07db 100644
---- a/tensorflow/python/eager/pywrap_tfe_src.cc
-+++ b/tensorflow/python/eager/pywrap_tfe_src.cc
-@@ -813,7 +813,7 @@ char* TFE_GetPythonString(PyObject* o) {
-   }
- #if PY_MAJOR_VERSION >= 3
-   if (PyUnicode_Check(o)) {
--    return PyUnicode_AsUTF8(o);
-+    return (char *)PyUnicode_AsUTF8(o);
-   }
- #endif
-   return nullptr;
-diff --git a/tensorflow/python/lib/core/ndarray_tensor.cc b/tensorflow/python/lib/core/ndarray_tensor.cc
-index 9df38d464c..4150fbfdd4 100644
---- a/tensorflow/python/lib/core/ndarray_tensor.cc
-+++ b/tensorflow/python/lib/core/ndarray_tensor.cc
-@@ -154,7 +154,7 @@ Status PyBytesArrayMap(PyArrayObject* array, F f) {
-     if (PyUnicode_Check(item.get())) {
- #if PY_VERSION_HEX >= 0x03030000
-       // Accept unicode by converting to UTF-8 bytes.
--      ptr = PyUnicode_AsUTF8AndSize(item.get(), &len);
-+      ptr = (char *)PyUnicode_AsUTF8AndSize(item.get(), &len);
-       if (!ptr) {
-         return errors::Internal("Unable to get element as UTF-8.");
-       }
-diff --git a/tensorflow/python/lib/core/py_func.cc b/tensorflow/python/lib/core/py_func.cc
-index 30c1a9c759..231a66de59 100644
---- a/tensorflow/python/lib/core/py_func.cc
-+++ b/tensorflow/python/lib/core/py_func.cc
-@@ -322,7 +322,7 @@ Status ConvertNdarrayToTensor(PyObject* obj, Tensor* ret) {
-         Py_ssize_t el_size;
-         if (PyBytes_AsStringAndSize(input_data[i], &el, &el_size) == -1) {
- #if PY_MAJOR_VERSION >= 3
--          el = PyUnicode_AsUTF8AndSize(input_data[i], &el_size);
-+          el = (char *)PyUnicode_AsUTF8AndSize(input_data[i], &el_size);
- #else
-           el = nullptr;
-           if (PyUnicode_Check(input_data[i])) {

Copied: tensorflow/repos/community-x86_64/python37.patch (from rev 371310, tensorflow/trunk/python37.patch)
===================================================================
--- python37.patch	                        (rev 0)
+++ python37.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,70 @@
+diff --git a/tensorflow/c/eager/c_api.h b/tensorflow/c/eager/c_api.h
+index fdbd5374b2..4dfcaf8100 100644
+--- a/tensorflow/c/eager/c_api.h
++++ b/tensorflow/c/eager/c_api.h
+@@ -76,7 +76,7 @@ typedef enum TFE_ContextDevicePlacementPolicy {
+ // Sets the default execution mode (sync/async). Note that this can be
+ // overridden per thread using TFE_ContextSetAsyncForThread.
+ TF_CAPI_EXPORT extern void TFE_ContextOptionsSetAsync(TFE_ContextOptions*,
+-                                                      unsigned char async);
++                                                      unsigned char is_async);
+ 
+ TF_CAPI_EXPORT extern void TFE_ContextOptionsSetDevicePlacementPolicy(
+     TFE_ContextOptions*, TFE_ContextDevicePlacementPolicy);
+@@ -125,7 +125,7 @@ TFE_ContextGetDevicePlacementPolicy(TFE_Context*);
+ 
+ // Overrides the execution mode (sync/async) for the current thread.
+ TF_CAPI_EXPORT extern void TFE_ContextSetAsyncForThread(TFE_Context*,
+-                                                        unsigned char async,
++                                                        unsigned char is_async,
+                                                         TF_Status* status);
+ 
+ // Causes the calling thread to block till all ops dispatched in async mode
+diff --git a/tensorflow/python/eager/pywrap_tfe_src.cc b/tensorflow/python/eager/pywrap_tfe_src.cc
+index ec7e2371e9..fe1a3bed84 100644
+--- a/tensorflow/python/eager/pywrap_tfe_src.cc
++++ b/tensorflow/python/eager/pywrap_tfe_src.cc
+@@ -216,7 +216,7 @@ bool ParseStringValue(const string& key, PyObject* py_value, TF_Status* status,
+ #if PY_MAJOR_VERSION >= 3
+   if (PyUnicode_Check(py_value)) {
+     Py_ssize_t size = 0;
+-    char* buf = PyUnicode_AsUTF8AndSize(py_value, &size);
++    const char* buf = PyUnicode_AsUTF8AndSize(py_value, &size);
+     if (buf == nullptr) return false;
+     *value = tensorflow::StringPiece(buf, size);
+     return true;
+@@ -831,7 +831,7 @@ char* TFE_GetPythonString(PyObject* o) {
+   }
+ #if PY_MAJOR_VERSION >= 3
+   if (PyUnicode_Check(o)) {
+-    return PyUnicode_AsUTF8(o);
++    return (char *)PyUnicode_AsUTF8(o);
+   }
+ #endif
+   return nullptr;
+diff --git a/tensorflow/python/lib/core/ndarray_tensor.cc b/tensorflow/python/lib/core/ndarray_tensor.cc
+index ec1ba7b8f7..2e09757ed6 100644
+--- a/tensorflow/python/lib/core/ndarray_tensor.cc
++++ b/tensorflow/python/lib/core/ndarray_tensor.cc
+@@ -154,7 +154,7 @@ Status PyBytesArrayMap(PyArrayObject* array, F f) {
+     if (PyUnicode_Check(item.get())) {
+ #if PY_VERSION_HEX >= 0x03030000
+       // Accept unicode by converting to UTF-8 bytes.
+-      ptr = PyUnicode_AsUTF8AndSize(item.get(), &len);
++      ptr = (char *)PyUnicode_AsUTF8AndSize(item.get(), &len);
+       if (!ptr) {
+         return errors::Internal("Unable to get element as UTF-8.");
+       }
+diff --git a/tensorflow/python/lib/core/py_func.cc b/tensorflow/python/lib/core/py_func.cc
+index 57139986af..9b198e22da 100644
+--- a/tensorflow/python/lib/core/py_func.cc
++++ b/tensorflow/python/lib/core/py_func.cc
+@@ -352,7 +352,7 @@ Status ConvertNdarrayToTensor(PyObject* obj, Tensor* ret) {
+         Py_ssize_t el_size;
+         if (PyBytes_AsStringAndSize(input_data[i], &el, &el_size) == -1) {
+ #if PY_MAJOR_VERSION >= 3
+-          el = PyUnicode_AsUTF8AndSize(input_data[i], &el_size);
++          el = (char *)PyUnicode_AsUTF8AndSize(input_data[i], &el_size);
+ #else
+           el = nullptr;
+           if (PyUnicode_Check(input_data[i])) {

Deleted: update-cython.patch
===================================================================
--- update-cython.patch	2018-08-13 17:06:48 UTC (rev 371310)
+++ update-cython.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -1,34 +0,0 @@
-From f7b39b0e72c1c8e9d0e72e3007000de39ee7a5ff Mon Sep 17 00:00:00 2001
-From: Yong Tang <yong.tang.github at outlook.com>
-Date: Mon, 25 Jun 2018 21:39:44 -0700
-Subject: [PATCH] Update cython to 0.28.3 (#20228)
-
-This fix updates the cython from 3732784 (09/2017)
-to the latest versioned release of 0.28.3 (05/2018).
-
-Signed-off-by: Yong Tang <yong.tang.github at outlook.com>
----
- tensorflow/workspace.bzl | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
-index b963bdab306..404eeb8aa36 100644
---- a/tensorflow/workspace.bzl
-+++ b/tensorflow/workspace.bzl
-@@ -662,12 +662,12 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
- 
-   tf_http_archive(
-       name = "cython",
--      sha256 = "6dcd30b5ceb887b2b965ee7ceb82ea3acb5f0642fe2206c7636b45acea4798e5",
-+      sha256 = "05e3eb7f06043f5ff2028338370329e71c29f57315e95f4dc6ad7c4971dd4c6f",
-       urls = [
--          "https://mirror.bazel.build/github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz",
--          "https://github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz",
-+          "https://mirror.bazel.build/github.com/cython/cython/archive/0.28.3.tar.gz",
-+          "https://github.com/cython/cython/archive/0.28.3.tar.gz",
-       ],
--      strip_prefix = "cython-3732784c45cfb040a5b0936951d196f83a12ea17",
-+      strip_prefix = "cython-0.28.3",
-       build_file = clean_dep("//third_party:cython.BUILD"),
-       delete = ["BUILD.bazel"],
-   )

Copied: tensorflow/repos/community-x86_64/update-cython.patch (from rev 371310, tensorflow/trunk/update-cython.patch)
===================================================================
--- update-cython.patch	                        (rev 0)
+++ update-cython.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,34 @@
+From f7b39b0e72c1c8e9d0e72e3007000de39ee7a5ff Mon Sep 17 00:00:00 2001
+From: Yong Tang <yong.tang.github at outlook.com>
+Date: Mon, 25 Jun 2018 21:39:44 -0700
+Subject: [PATCH] Update cython to 0.28.3 (#20228)
+
+This fix updates the cython from 3732784 (09/2017)
+to the latest versioned release of 0.28.3 (05/2018).
+
+Signed-off-by: Yong Tang <yong.tang.github at outlook.com>
+---
+ tensorflow/workspace.bzl | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
+index b963bdab306..404eeb8aa36 100644
+--- a/tensorflow/workspace.bzl
++++ b/tensorflow/workspace.bzl
+@@ -662,12 +662,12 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
+ 
+   tf_http_archive(
+       name = "cython",
+-      sha256 = "6dcd30b5ceb887b2b965ee7ceb82ea3acb5f0642fe2206c7636b45acea4798e5",
++      sha256 = "05e3eb7f06043f5ff2028338370329e71c29f57315e95f4dc6ad7c4971dd4c6f",
+       urls = [
+-          "https://mirror.bazel.build/github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz",
+-          "https://github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz",
++          "https://mirror.bazel.build/github.com/cython/cython/archive/0.28.3.tar.gz",
++          "https://github.com/cython/cython/archive/0.28.3.tar.gz",
+       ],
+-      strip_prefix = "cython-3732784c45cfb040a5b0936951d196f83a12ea17",
++      strip_prefix = "cython-0.28.3",
+       build_file = clean_dep("//third_party:cython.BUILD"),
+       delete = ["BUILD.bazel"],
+   )

Deleted: update-protobuf.patch
===================================================================
--- update-protobuf.patch	2018-08-13 17:06:48 UTC (rev 371310)
+++ update-protobuf.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -1,146 +0,0 @@
-From 3bfd3aeb7856f414e511e20493dd1bdf952649cf Mon Sep 17 00:00:00 2001
-From: Gunhan Gulsoy <gunan at google.com>
-Date: Wed, 20 Jun 2018 11:29:27 -0700
-Subject: [PATCH] Update protobuf dependency of TF to 3.6.
-
-PiperOrigin-RevId: 201386306
----
- tensorflow/contrib/cmake/external/protobuf.cmake   |  2 +-
- .../tools/ci_build/install/install_pip_packages.sh |  4 ++--
- .../tools/ci_build/install/install_proto3.sh       |  2 +-
- .../install/install_python3.5_pip_packages.sh      |  2 +-
- .../install/install_python3.6_pip_packages.sh      |  2 +-
- tensorflow/tools/pip_package/setup.py              |  2 +-
- tensorflow/workspace.bzl                           | 24 +++++++++++-----------
- 7 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/tensorflow/contrib/cmake/external/protobuf.cmake b/tensorflow/contrib/cmake/external/protobuf.cmake
-index ab464bc99a4..f56fb35a0f7 100644
---- a/tensorflow/contrib/cmake/external/protobuf.cmake
-+++ b/tensorflow/contrib/cmake/external/protobuf.cmake
-@@ -16,7 +16,7 @@ include (ExternalProject)
- 
- set(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf/src)
- set(PROTOBUF_URL https://github.com/google/protobuf.git)
--set(PROTOBUF_TAG b04e5cba356212e4e8c66c61bbe0c3a20537c5b9)
-+set(PROTOBUF_TAG v3.6.0)
- 
- if(WIN32)
-   if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
-diff --git a/tensorflow/tools/ci_build/install/install_pip_packages.sh b/tensorflow/tools/ci_build/install/install_pip_packages.sh
-index 88f1d041932..fbed4574e02 100755
---- a/tensorflow/tools/ci_build/install/install_pip_packages.sh
-+++ b/tensorflow/tools/ci_build/install/install_pip_packages.sh
-@@ -51,8 +51,8 @@ pip2 install --upgrade markdown==2.6.8
- pip3 install --upgrade markdown==2.6.8
- 
- # Install protobuf.
--pip2 install --upgrade protobuf==3.3.0
--pip3 install --upgrade protobuf==3.3.0
-+pip2 install --upgrade protobuf==3.6.0
-+pip3 install --upgrade protobuf==3.6.0
- 
- # Remove obsolete version of six, which can sometimes confuse virtualenv.
- rm -rf /usr/lib/python3/dist-packages/six*
-diff --git a/tensorflow/tools/ci_build/install/install_proto3.sh b/tensorflow/tools/ci_build/install/install_proto3.sh
-index 7934002b2c9..821d50baff3 100755
---- a/tensorflow/tools/ci_build/install/install_proto3.sh
-+++ b/tensorflow/tools/ci_build/install/install_proto3.sh
-@@ -17,7 +17,7 @@
- # Install protobuf3.
- 
- # Select protobuf version.
--PROTOBUF_VERSION="3.3.0"
-+PROTOBUF_VERSION="3.6.0"
- protobuf_ver_flat=$(echo $PROTOBUF_VERSION | sed 's/\.//g' | sed 's/^0*//g')
- local_protobuf_ver=$(protoc --version)
- local_protobuf_ver_flat=$(echo $local_protobuf_ver | sed 's/\.//g' | sed 's/^0*//g')
-diff --git a/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh b/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
-index acd69ef346f..037fc0e2e1e 100755
---- a/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
-+++ b/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
-@@ -48,7 +48,7 @@ pip3.5 install --upgrade absl-py
- pip3.5 install --upgrade six==1.10.0
- 
- # Install protobuf.
--pip3.5 install --upgrade protobuf==3.3.0
-+pip3.5 install --upgrade protobuf==3.6.0
- 
- # Remove obsolete version of six, which can sometimes confuse virtualenv.
- rm -rf /usr/lib/python3/dist-packages/six*
-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 323b30f48e3..8fd65a3ee26 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
-@@ -60,7 +60,7 @@ pip3 install --upgrade absl-py
- pip3 install --upgrade six==1.10.0
- 
- # Install protobuf.
--pip3 install --upgrade protobuf==3.3.0
-+pip3 install --upgrade protobuf==3.6.0
- 
- # Remove obsolete version of six, which can sometimes confuse virtualenv.
- rm -rf /usr/lib/python3/dist-packages/six*
-diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
-index 97f625e7e9c..253802b9598 100644
---- a/tensorflow/tools/pip_package/setup.py
-+++ b/tensorflow/tools/pip_package/setup.py
-@@ -53,7 +53,7 @@
-     'gast >= 0.2.0',
-     'numpy >= 1.13.3',
-     'six >= 1.10.0',
--    'protobuf >= 3.4.0',
-+    'protobuf >= 3.6.0',
-     'setuptools <= 39.1.0',
-     'tensorboard >= 1.8.0, < 1.9.0',
-     'termcolor >= 1.1.0',
-diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
-index b32d4732199..1f1d106bfb9 100644
---- a/tensorflow/workspace.bzl
-+++ b/tensorflow/workspace.bzl
-@@ -330,11 +330,11 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
-   tf_http_archive(
-       name = "protobuf_archive",
-       urls = [
--          "https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
--          "https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
-+          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
-+          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
-       ],
--      sha256 = "846d907acf472ae233ec0882ef3a2d24edbbe834b80c305e867ac65a1f2c59e3",
--      strip_prefix = "protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a",
-+      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
-+      strip_prefix = "protobuf-3.6.0",
-   )
- 
-   # We need to import the protobuf library under the names com_google_protobuf
-@@ -343,21 +343,21 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
-   tf_http_archive(
-       name = "com_google_protobuf",
-       urls = [
--          "https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
--          "https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
-+          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
-+          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
-       ],
--      sha256 = "846d907acf472ae233ec0882ef3a2d24edbbe834b80c305e867ac65a1f2c59e3",
--      strip_prefix = "protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a",
-+      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
-+      strip_prefix = "protobuf-3.6.0",
-   )
- 
-   tf_http_archive(
-       name = "com_google_protobuf_cc",
-       urls = [
--          "https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
--          "https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
-+          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
-+          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
-       ],
--      sha256 = "846d907acf472ae233ec0882ef3a2d24edbbe834b80c305e867ac65a1f2c59e3",
--      strip_prefix = "protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a",
-+      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
-+      strip_prefix = "protobuf-3.6.0",
-   )
- 
-   tf_http_archive(

Copied: tensorflow/repos/community-x86_64/update-protobuf.patch (from rev 371310, tensorflow/trunk/update-protobuf.patch)
===================================================================
--- update-protobuf.patch	                        (rev 0)
+++ update-protobuf.patch	2018-08-13 17:07:03 UTC (rev 371311)
@@ -0,0 +1,146 @@
+From 3bfd3aeb7856f414e511e20493dd1bdf952649cf Mon Sep 17 00:00:00 2001
+From: Gunhan Gulsoy <gunan at google.com>
+Date: Wed, 20 Jun 2018 11:29:27 -0700
+Subject: [PATCH] Update protobuf dependency of TF to 3.6.
+
+PiperOrigin-RevId: 201386306
+---
+ tensorflow/contrib/cmake/external/protobuf.cmake   |  2 +-
+ .../tools/ci_build/install/install_pip_packages.sh |  4 ++--
+ .../tools/ci_build/install/install_proto3.sh       |  2 +-
+ .../install/install_python3.5_pip_packages.sh      |  2 +-
+ .../install/install_python3.6_pip_packages.sh      |  2 +-
+ tensorflow/tools/pip_package/setup.py              |  2 +-
+ tensorflow/workspace.bzl                           | 24 +++++++++++-----------
+ 7 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/tensorflow/contrib/cmake/external/protobuf.cmake b/tensorflow/contrib/cmake/external/protobuf.cmake
+index ab464bc99a4..f56fb35a0f7 100644
+--- a/tensorflow/contrib/cmake/external/protobuf.cmake
++++ b/tensorflow/contrib/cmake/external/protobuf.cmake
+@@ -16,7 +16,7 @@ include (ExternalProject)
+ 
+ set(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf/src)
+ set(PROTOBUF_URL https://github.com/google/protobuf.git)
+-set(PROTOBUF_TAG b04e5cba356212e4e8c66c61bbe0c3a20537c5b9)
++set(PROTOBUF_TAG v3.6.0)
+ 
+ if(WIN32)
+   if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
+diff --git a/tensorflow/tools/ci_build/install/install_pip_packages.sh b/tensorflow/tools/ci_build/install/install_pip_packages.sh
+index 88f1d041932..fbed4574e02 100755
+--- a/tensorflow/tools/ci_build/install/install_pip_packages.sh
++++ b/tensorflow/tools/ci_build/install/install_pip_packages.sh
+@@ -51,8 +51,8 @@ pip2 install --upgrade markdown==2.6.8
+ pip3 install --upgrade markdown==2.6.8
+ 
+ # Install protobuf.
+-pip2 install --upgrade protobuf==3.3.0
+-pip3 install --upgrade protobuf==3.3.0
++pip2 install --upgrade protobuf==3.6.0
++pip3 install --upgrade protobuf==3.6.0
+ 
+ # Remove obsolete version of six, which can sometimes confuse virtualenv.
+ rm -rf /usr/lib/python3/dist-packages/six*
+diff --git a/tensorflow/tools/ci_build/install/install_proto3.sh b/tensorflow/tools/ci_build/install/install_proto3.sh
+index 7934002b2c9..821d50baff3 100755
+--- a/tensorflow/tools/ci_build/install/install_proto3.sh
++++ b/tensorflow/tools/ci_build/install/install_proto3.sh
+@@ -17,7 +17,7 @@
+ # Install protobuf3.
+ 
+ # Select protobuf version.
+-PROTOBUF_VERSION="3.3.0"
++PROTOBUF_VERSION="3.6.0"
+ protobuf_ver_flat=$(echo $PROTOBUF_VERSION | sed 's/\.//g' | sed 's/^0*//g')
+ local_protobuf_ver=$(protoc --version)
+ local_protobuf_ver_flat=$(echo $local_protobuf_ver | sed 's/\.//g' | sed 's/^0*//g')
+diff --git a/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh b/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
+index acd69ef346f..037fc0e2e1e 100755
+--- a/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
++++ b/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
+@@ -48,7 +48,7 @@ pip3.5 install --upgrade absl-py
+ pip3.5 install --upgrade six==1.10.0
+ 
+ # Install protobuf.
+-pip3.5 install --upgrade protobuf==3.3.0
++pip3.5 install --upgrade protobuf==3.6.0
+ 
+ # Remove obsolete version of six, which can sometimes confuse virtualenv.
+ rm -rf /usr/lib/python3/dist-packages/six*
+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 323b30f48e3..8fd65a3ee26 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
+@@ -60,7 +60,7 @@ pip3 install --upgrade absl-py
+ pip3 install --upgrade six==1.10.0
+ 
+ # Install protobuf.
+-pip3 install --upgrade protobuf==3.3.0
++pip3 install --upgrade protobuf==3.6.0
+ 
+ # Remove obsolete version of six, which can sometimes confuse virtualenv.
+ rm -rf /usr/lib/python3/dist-packages/six*
+diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
+index 97f625e7e9c..253802b9598 100644
+--- a/tensorflow/tools/pip_package/setup.py
++++ b/tensorflow/tools/pip_package/setup.py
+@@ -53,7 +53,7 @@
+     'gast >= 0.2.0',
+     'numpy >= 1.13.3',
+     'six >= 1.10.0',
+-    'protobuf >= 3.4.0',
++    'protobuf >= 3.6.0',
+     'setuptools <= 39.1.0',
+     'tensorboard >= 1.8.0, < 1.9.0',
+     'termcolor >= 1.1.0',
+diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
+index b32d4732199..1f1d106bfb9 100644
+--- a/tensorflow/workspace.bzl
++++ b/tensorflow/workspace.bzl
+@@ -330,11 +330,11 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
+   tf_http_archive(
+       name = "protobuf_archive",
+       urls = [
+-          "https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
+-          "https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
++          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
++          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
+       ],
+-      sha256 = "846d907acf472ae233ec0882ef3a2d24edbbe834b80c305e867ac65a1f2c59e3",
+-      strip_prefix = "protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a",
++      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
++      strip_prefix = "protobuf-3.6.0",
+   )
+ 
+   # We need to import the protobuf library under the names com_google_protobuf
+@@ -343,21 +343,21 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
+   tf_http_archive(
+       name = "com_google_protobuf",
+       urls = [
+-          "https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
+-          "https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
++          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
++          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
+       ],
+-      sha256 = "846d907acf472ae233ec0882ef3a2d24edbbe834b80c305e867ac65a1f2c59e3",
+-      strip_prefix = "protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a",
++      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
++      strip_prefix = "protobuf-3.6.0",
+   )
+ 
+   tf_http_archive(
+       name = "com_google_protobuf_cc",
+       urls = [
+-          "https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
+-          "https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz",
++          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
++          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
+       ],
+-      sha256 = "846d907acf472ae233ec0882ef3a2d24edbbe834b80c305e867ac65a1f2c59e3",
+-      strip_prefix = "protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a",
++      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
++      strip_prefix = "protobuf-3.6.0",
+   )
+ 
+   tf_http_archive(



More information about the arch-commits mailing list