[arch-commits] Commit in tensorflow/repos/community-staging-x86_64 (6 files)
Sven-Hendrik Haase
svenstaro at archlinux.org
Tue Oct 29 16:15:59 UTC 2019
Date: Tuesday, October 29, 2019 @ 16:15:57
Author: svenstaro
Revision: 520928
archrelease: copy trunk to community-staging-x86_64
Added:
tensorflow/repos/community-staging-x86_64/PKGBUILD
(from rev 520927, tensorflow/trunk/PKGBUILD)
tensorflow/repos/community-staging-x86_64/glibc-2.30.patch
(from rev 520927, tensorflow/trunk/glibc-2.30.patch)
tensorflow/repos/community-staging-x86_64/python-3.8.patch
(from rev 520927, tensorflow/trunk/python-3.8.patch)
Deleted:
tensorflow/repos/community-staging-x86_64/PKGBUILD
tensorflow/repos/community-staging-x86_64/glibc-2.30.patch
tensorflow/repos/community-staging-x86_64/python-3.8.patch
------------------+
PKGBUILD | 509 ++++++++++++++++++++++++++---------------------------
glibc-2.30.patch | 178 +++++++++---------
python-3.8.patch | 140 +++++++-------
3 files changed, 414 insertions(+), 413 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-29 16:15:36 UTC (rev 520927)
+++ PKGBUILD 2019-10-29 16:15:57 UTC (rev 520928)
@@ -1,254 +0,0 @@
-# Maintainer: Sven-Hendrik Haase <svenstaro at gmail.com>
-# Co-Maintainer: Konstantin Gizdov (kgizdov) <arch at kge.pw>
-# 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=2.0.0
-_pkgver=2.0.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')
-depends=('c-ares')
-makedepends=('bazel<1' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' 'gcc'
- 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools' 'python-h5py'
- 'python-keras-applications' 'python-keras-preprocessing')
-optdepends=('tensorboard: Tensorflow visualization toolkit')
-source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
- 'python-3.8.patch'
- 'glibc-2.30.patch')
-sha512sums=('c3a2cb9673d2ade8e83961f7d944165123d0e4d94e6ca4d8fdee4f02f536893b879bbbf78d3ad5e557467b58f97f7194f2d9cfc64d7d05540969be732070eecc'
- 'ef06196f1a7f5a4dff4d83916566dae8f2f2c2993ddcd40017583020dd9bfc73ef426c45b0cc5630d1dd53321b99736f2c60b37bb9370be02174c1209e041ffb'
- 'a9345b7206e9f8ae9fc33987997808dcdeaf3e4c05caf40785bba2a9ef2292e20046bfd54ce05fee2ccd11ded9d8e918b2a131d830a7e238406e6ddf222e830e')
-
-get_pyver () {
- python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
-}
-
-prepare() {
- patch -Np1 -d tensorflow-${_pkgver} <python-3.8.patch
- patch -Np1 -d tensorflow-${_pkgver} <glibc-2.30.patch
-
- 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_NEED_NGRAPH=0
- export TF_NEED_IGNITE=0
- export TF_NEED_ROCM=0
- export TF_SET_ANDROID_WORKSPACE=0
- export TF_DOWNLOAD_CLANG=0
- export TF_NCCL_VERSION=2.4
- export TF_IGNORE_MAX_BAZEL_VERSION=1
- export NCCL_INSTALL_PATH=/usr
- export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-8
- export HOST_CXX_COMPILER_PATH=/usr/bin/gcc-8
- export TF_CUDA_CLANG=0 # Clang currently disabled because it's not compatible at the moment.
- export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
- 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.h)
- export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5
-}
-
-build() {
- echo "Building without cuda and without non-x86-64 optimizations"
- cd "${srcdir}"/tensorflow-${_pkgver}
- export CC_OPT_FLAGS="-march=x86-64"
- export TF_NEED_CUDA=0
- ./configure
- bazel \
- build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
- //tensorflow:libtensorflow.so \
- //tensorflow:libtensorflow_cc.so \
- //tensorflow:install_headers \
- //tensorflow/tools/pip_package:build_pip_package
- bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmp
-
-
- echo "Building without cuda and with non-x86-64 optimizations"
- cd "${srcdir}"/tensorflow-${_pkgver}-opt
- export CC_OPT_FLAGS="-march=haswell"
- export TF_NEED_CUDA=0
- ./configure
- bazel \
- build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
- //tensorflow:libtensorflow.so \
- //tensorflow:libtensorflow_cc.so \
- //tensorflow:install_headers \
- //tensorflow/tools/pip_package:build_pip_package
- bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpopt
-
-
- echo "Building with cuda and without non-x86-64 optimizations"
- cd "${srcdir}"/tensorflow-${_pkgver}-cuda
- export CC_OPT_FLAGS="-march=x86-64"
- export TF_NEED_CUDA=1
- ./configure
- bazel \
- build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
- //tensorflow:libtensorflow.so \
- //tensorflow:libtensorflow_cc.so \
- //tensorflow:install_headers \
- //tensorflow/tools/pip_package:build_pip_package
- bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpcuda
-
-
- echo "Building with cuda and without non-x86-64 optimizations"
- cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
- export CC_OPT_FLAGS="-march=haswell"
- export TF_NEED_CUDA=1
- export TF_CUDA_CLANG=0
- ./configure
- bazel \
- build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
- //tensorflow:libtensorflow.so \
- //tensorflow:libtensorflow_cc.so \
- //tensorflow:install_headers \
- //tensorflow/tools/pip_package:build_pip_package
- bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpoptcuda
-}
-
-_package() {
- # install headers first
- install -d "${pkgdir}"/usr/include/tensorflow
- cp -r bazel-genfiles/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/
- # install python-version to get all extra headers
- 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
- find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
- cp -nr "${_folder}" "${pkgdir}"/usr/include/tensorflow/
- done
- # clean up unneeded files
- rm -rf "${pkgdir}"/usr/bin
- rm -rf "${pkgdir}"/usr/lib
- rm -rf "${pkgdir}"/usr/share
-
- # install the rest of tensorflow
- tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
- sed -e 's/\/include/\/include\/tensorflow/' -i tensorflow.pc
- install -Dm644 tensorflow.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow.pc
- install -Dm755 bazel-bin/tensorflow/libtensorflow.so "${pkgdir}"/usr/lib/libtensorflow.so.${pkgver}
- ln -s libtensorflow.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow.so.${pkgver:0:1}
- ln -s libtensorflow.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow.so
- install -Dm755 bazel-bin/tensorflow/libtensorflow_cc.so "${pkgdir}"/usr/lib/libtensorflow_cc.so.${pkgver}
- ln -s libtensorflow_cc.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow_cc.so.${pkgver:0:1}
- ln -s libtensorflow_cc.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_cc.so
- install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so "${pkgdir}"/usr/lib/libtensorflow_framework.so.${pkgver}
- ln -s libtensorflow_framework.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow_framework.so.${pkgver:0:1}
- ln -s libtensorflow_framework.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_framework.so
- install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
-}
-
-_python_package() {
- WHEEL_PACKAGE=$(find "${srcdir}"/$1 -name "tensor*.whl")
- pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-
- # create symlinks to headers
- find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
- rm -rf "${_folder}"
- _smlink="$(basename "${_folder}")"
- ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
- done
-
- # 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_tensorflow() {
- cd "${srcdir}"/tensorflow-${_pkgver}
- _package tmp
-}
-
-package_tensorflow-opt() {
- pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
- conflicts=(tensorflow)
- provides=(tensorflow)
-
- cd "${srcdir}"/tensorflow-${_pkgver}-opt
- _package tmpopt
-}
-
-package_tensorflow-cuda() {
- pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
- depends+=(cuda cudnn nccl)
- conflicts=(tensorflow)
- provides=(tensorflow)
-
- cd "${srcdir}"/tensorflow-${_pkgver}-cuda
- _package tmpcuda
-}
-
-package_tensorflow-opt-cuda() {
- pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
- depends+=(cuda cudnn nccl)
- conflicts=(tensorflow)
- provides=(tensorflow tensorflow-cuda)
-
- cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
- _package tmpoptcuda
-}
-
-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)
-
- cd "${srcdir}"/tensorflow-${_pkgver}
- _python_package tmp
-}
-
-package_python-tensorflow-opt() {
- pkgdesc="Library for computation using data flow graphs for scalable machine learning (with 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)
- conflicts=(python-tensorflow)
- provides=(python-tensorflow)
-
- cd "${srcdir}"/tensorflow-${_pkgver}-opt
- _python_package tmpopt
-}
-
-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)
- conflicts=(python-tensorflow)
- provides=(python-tensorflow)
-
- cd "${srcdir}"/tensorflow-${_pkgver}-cuda
- _python_package tmpcuda
-}
-
-package_python-tensorflow-opt-cuda() {
- pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and 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)
- conflicts=(python-tensorflow)
- provides=(python-tensorflow python-tensorflow-cuda)
-
- cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
- _python_package tmpoptcuda
-}
-
-# vim:set ts=2 sw=2 et:
Copied: tensorflow/repos/community-staging-x86_64/PKGBUILD (from rev 520927, tensorflow/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-10-29 16:15:57 UTC (rev 520928)
@@ -0,0 +1,255 @@
+# Maintainer: Sven-Hendrik Haase <svenstaro at gmail.com>
+# Co-Maintainer: Konstantin Gizdov (kgizdov) <arch at kge.pw>
+# 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=2.0.0
+_pkgver=2.0.0
+pkgrel=4
+pkgdesc="Library for computation using data flow graphs for scalable machine learning"
+url="https://www.tensorflow.org/"
+license=('APACHE')
+arch=('x86_64')
+depends=('c-ares')
+makedepends=('bazel<1' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' 'gcc'
+ 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools' 'python-h5py'
+ 'python-keras-applications' 'python-keras-preprocessing')
+optdepends=('tensorboard: Tensorflow visualization toolkit'
+ 'python-pasta: tf_upgrade_v2 tool')
+source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
+ 'python-3.8.patch'
+ 'glibc-2.30.patch')
+sha512sums=('c3a2cb9673d2ade8e83961f7d944165123d0e4d94e6ca4d8fdee4f02f536893b879bbbf78d3ad5e557467b58f97f7194f2d9cfc64d7d05540969be732070eecc'
+ 'ef06196f1a7f5a4dff4d83916566dae8f2f2c2993ddcd40017583020dd9bfc73ef426c45b0cc5630d1dd53321b99736f2c60b37bb9370be02174c1209e041ffb'
+ 'a9345b7206e9f8ae9fc33987997808dcdeaf3e4c05caf40785bba2a9ef2292e20046bfd54ce05fee2ccd11ded9d8e918b2a131d830a7e238406e6ddf222e830e')
+
+get_pyver () {
+ python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare() {
+ patch -Np1 -d tensorflow-${_pkgver} <python-3.8.patch
+ patch -Np1 -d tensorflow-${_pkgver} <glibc-2.30.patch
+
+ 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_NEED_NGRAPH=0
+ export TF_NEED_IGNITE=0
+ export TF_NEED_ROCM=0
+ export TF_SET_ANDROID_WORKSPACE=0
+ export TF_DOWNLOAD_CLANG=0
+ export TF_NCCL_VERSION=2.4
+ export TF_IGNORE_MAX_BAZEL_VERSION=1
+ export NCCL_INSTALL_PATH=/usr
+ export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-8
+ export HOST_CXX_COMPILER_PATH=/usr/bin/gcc-8
+ export TF_CUDA_CLANG=0 # Clang currently disabled because it's not compatible at the moment.
+ export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
+ 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.h)
+ export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5
+}
+
+build() {
+ echo "Building without cuda and without non-x86-64 optimizations"
+ cd "${srcdir}"/tensorflow-${_pkgver}
+ export CC_OPT_FLAGS="-march=x86-64"
+ export TF_NEED_CUDA=0
+ ./configure
+ bazel \
+ build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
+ //tensorflow:libtensorflow.so \
+ //tensorflow:libtensorflow_cc.so \
+ //tensorflow:install_headers \
+ //tensorflow/tools/pip_package:build_pip_package
+ bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmp
+
+
+ echo "Building without cuda and with non-x86-64 optimizations"
+ cd "${srcdir}"/tensorflow-${_pkgver}-opt
+ export CC_OPT_FLAGS="-march=haswell"
+ export TF_NEED_CUDA=0
+ ./configure
+ bazel \
+ build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
+ //tensorflow:libtensorflow.so \
+ //tensorflow:libtensorflow_cc.so \
+ //tensorflow:install_headers \
+ //tensorflow/tools/pip_package:build_pip_package
+ bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpopt
+
+
+ echo "Building with cuda and without non-x86-64 optimizations"
+ cd "${srcdir}"/tensorflow-${_pkgver}-cuda
+ export CC_OPT_FLAGS="-march=x86-64"
+ export TF_NEED_CUDA=1
+ ./configure
+ bazel \
+ build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
+ //tensorflow:libtensorflow.so \
+ //tensorflow:libtensorflow_cc.so \
+ //tensorflow:install_headers \
+ //tensorflow/tools/pip_package:build_pip_package
+ bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpcuda
+
+
+ echo "Building with cuda and without non-x86-64 optimizations"
+ cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
+ export CC_OPT_FLAGS="-march=haswell"
+ export TF_NEED_CUDA=1
+ export TF_CUDA_CLANG=0
+ ./configure
+ bazel \
+ build --config=opt --incompatible_no_support_tools_in_action_inputs=false \
+ //tensorflow:libtensorflow.so \
+ //tensorflow:libtensorflow_cc.so \
+ //tensorflow:install_headers \
+ //tensorflow/tools/pip_package:build_pip_package
+ bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpoptcuda
+}
+
+_package() {
+ # install headers first
+ install -d "${pkgdir}"/usr/include/tensorflow
+ cp -r bazel-genfiles/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/
+ # install python-version to get all extra headers
+ 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
+ find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
+ cp -nr "${_folder}" "${pkgdir}"/usr/include/tensorflow/
+ done
+ # clean up unneeded files
+ rm -rf "${pkgdir}"/usr/bin
+ rm -rf "${pkgdir}"/usr/lib
+ rm -rf "${pkgdir}"/usr/share
+
+ # install the rest of tensorflow
+ tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+ sed -e 's/\/include/\/include\/tensorflow/' -i tensorflow.pc
+ install -Dm644 tensorflow.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow.pc
+ install -Dm755 bazel-bin/tensorflow/libtensorflow.so "${pkgdir}"/usr/lib/libtensorflow.so.${pkgver}
+ ln -s libtensorflow.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow.so.${pkgver:0:1}
+ ln -s libtensorflow.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow.so
+ install -Dm755 bazel-bin/tensorflow/libtensorflow_cc.so "${pkgdir}"/usr/lib/libtensorflow_cc.so.${pkgver}
+ ln -s libtensorflow_cc.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow_cc.so.${pkgver:0:1}
+ ln -s libtensorflow_cc.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_cc.so
+ install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so "${pkgdir}"/usr/lib/libtensorflow_framework.so.${pkgver}
+ ln -s libtensorflow_framework.so.${pkgver} "${pkgdir}"/usr/lib/libtensorflow_framework.so.${pkgver:0:1}
+ ln -s libtensorflow_framework.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_framework.so
+ install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+
+_python_package() {
+ WHEEL_PACKAGE=$(find "${srcdir}"/$1 -name "tensor*.whl")
+ pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
+
+ # create symlinks to headers
+ find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
+ rm -rf "${_folder}"
+ _smlink="$(basename "${_folder}")"
+ ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
+ done
+
+ # 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_tensorflow() {
+ cd "${srcdir}"/tensorflow-${_pkgver}
+ _package tmp
+}
+
+package_tensorflow-opt() {
+ pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
+ conflicts=(tensorflow)
+ provides=(tensorflow)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}-opt
+ _package tmpopt
+}
+
+package_tensorflow-cuda() {
+ pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
+ depends+=(cuda cudnn nccl)
+ conflicts=(tensorflow)
+ provides=(tensorflow)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}-cuda
+ _package tmpcuda
+}
+
+package_tensorflow-opt-cuda() {
+ pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
+ depends+=(cuda cudnn nccl)
+ conflicts=(tensorflow)
+ provides=(tensorflow tensorflow-cuda)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
+ _package tmpoptcuda
+}
+
+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)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}
+ _python_package tmp
+}
+
+package_python-tensorflow-opt() {
+ pkgdesc="Library for computation using data flow graphs for scalable machine learning (with 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)
+ conflicts=(python-tensorflow)
+ provides=(python-tensorflow)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}-opt
+ _python_package tmpopt
+}
+
+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)
+ conflicts=(python-tensorflow)
+ provides=(python-tensorflow)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}-cuda
+ _python_package tmpcuda
+}
+
+package_python-tensorflow-opt-cuda() {
+ pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and 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)
+ conflicts=(python-tensorflow)
+ provides=(python-tensorflow python-tensorflow-cuda)
+
+ cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
+ _python_package tmpoptcuda
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: glibc-2.30.patch
===================================================================
--- glibc-2.30.patch 2019-10-29 16:15:36 UTC (rev 520927)
+++ glibc-2.30.patch 2019-10-29 16:15:57 UTC (rev 520928)
@@ -1,89 +0,0 @@
-From 7bf3f05197bb6d71beba9dcd0ac83ddfcf7f1919 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia at windriver.com>
-Date: Fri, 23 Aug 2019 13:54:52 +0000
-Subject: [PATCH] grpc: Define gettid() only for glibc < 2.30
-
-glibc 2.30 has added this API, so let us use that when possible
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
----
- tensorflow/workspace.bzl | 1 +
- ...01-Define-gettid-only-for-glibc-2.30.patch | 52 +++++++++++++++++++
- 2 files changed, 53 insertions(+)
- create mode 100644 third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch
-
-diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
-index 788eca2f67..8a37fe5643 100755
---- a/tensorflow/workspace.bzl
-+++ b/tensorflow/workspace.bzl
-@@ -475,6 +475,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
- sha256 = "1aa84387232dda273ea8fdfe722622084f72c16f7b84bfc519ac7759b71cdc91",
- strip_prefix = "grpc-69b6c047bc767b4d80e7af4d00ccb7c45b683dae",
- system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
-+ patch_file = clean_dep("//third_party/systemlibs:0001-Define-gettid-only-for-glibc-2.30.patch"),
- urls = [
- "https://mirror.bazel.build/github.com/grpc/grpc/archive/69b6c047bc767b4d80e7af4d00ccb7c45b683dae.tar.gz",
- "https://github.com/grpc/grpc/archive/69b6c047bc767b4d80e7af4d00ccb7c45b683dae.tar.gz",
-diff --git a/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch b/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch
-new file mode 100644
-index 0000000000..30f1d7b252
---- /dev/null
-+++ b/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch
-@@ -0,0 +1,52 @@
-+From 1d630079c3d1013baebd19060f4e6050112cb66d Mon Sep 17 00:00:00 2001
-+From: Hongxu Jia <hongxu.jia at windriver.com>
-+Date: Fri, 23 Aug 2019 13:52:01 +0000
-+Subject: [PATCH] Define gettid() only for glibc < 2.30
-+
-+glibc 2.30 has added this API, so let us use that when possible
-+
-+Upstream-Status: Pending
-+Signed-off-by: Khem Raj <raj.khem at gmail.com>
-+
-+Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
-+---
-+ src/core/lib/gpr/log_linux.cc | 4 ++++
-+ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++++
-+ 2 files changed, 8 insertions(+)
-+
-+diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
-+index 561276f..25a7486 100644
-+--- a/src/core/lib/gpr/log_linux.cc
-++++ b/src/core/lib/gpr/log_linux.cc
-+@@ -40,7 +40,11 @@
-+ #include <time.h>
-+ #include <unistd.h>
-+
-++#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29)
-++#include <unistd.h>
-++#else
-+ static long gettid(void) { return syscall(__NR_gettid); }
-++#endif
-+
-+ void gpr_log(const char* file, int line, gpr_log_severity severity,
-+ const char* format, ...) {
-+diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
-+index 06a382c..ec321f2 100644
-+--- a/src/core/lib/iomgr/ev_epollex_linux.cc
-++++ b/src/core/lib/iomgr/ev_epollex_linux.cc
-+@@ -1150,8 +1150,12 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
-+ }
-+
-+ #ifndef NDEBUG
-++#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29)
-++#include <unistd.h>
-++#else
-+ static long gettid(void) { return syscall(__NR_gettid); }
-+ #endif
-++#endif
-+
-+ /* pollset->mu lock must be held by the caller before calling this.
-+ The function pollset_work() may temporarily release the lock (pollset->po.mu)
-+--
-+2.17.1
-+
---
-2.17.1
-
Copied: tensorflow/repos/community-staging-x86_64/glibc-2.30.patch (from rev 520927, tensorflow/trunk/glibc-2.30.patch)
===================================================================
--- glibc-2.30.patch (rev 0)
+++ glibc-2.30.patch 2019-10-29 16:15:57 UTC (rev 520928)
@@ -0,0 +1,89 @@
+From 7bf3f05197bb6d71beba9dcd0ac83ddfcf7f1919 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia at windriver.com>
+Date: Fri, 23 Aug 2019 13:54:52 +0000
+Subject: [PATCH] grpc: Define gettid() only for glibc < 2.30
+
+glibc 2.30 has added this API, so let us use that when possible
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
+---
+ tensorflow/workspace.bzl | 1 +
+ ...01-Define-gettid-only-for-glibc-2.30.patch | 52 +++++++++++++++++++
+ 2 files changed, 53 insertions(+)
+ create mode 100644 third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch
+
+diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
+index 788eca2f67..8a37fe5643 100755
+--- a/tensorflow/workspace.bzl
++++ b/tensorflow/workspace.bzl
+@@ -475,6 +475,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
+ sha256 = "1aa84387232dda273ea8fdfe722622084f72c16f7b84bfc519ac7759b71cdc91",
+ strip_prefix = "grpc-69b6c047bc767b4d80e7af4d00ccb7c45b683dae",
+ system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
++ patch_file = clean_dep("//third_party/systemlibs:0001-Define-gettid-only-for-glibc-2.30.patch"),
+ urls = [
+ "https://mirror.bazel.build/github.com/grpc/grpc/archive/69b6c047bc767b4d80e7af4d00ccb7c45b683dae.tar.gz",
+ "https://github.com/grpc/grpc/archive/69b6c047bc767b4d80e7af4d00ccb7c45b683dae.tar.gz",
+diff --git a/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch b/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch
+new file mode 100644
+index 0000000000..30f1d7b252
+--- /dev/null
++++ b/third_party/systemlibs/0001-Define-gettid-only-for-glibc-2.30.patch
+@@ -0,0 +1,52 @@
++From 1d630079c3d1013baebd19060f4e6050112cb66d Mon Sep 17 00:00:00 2001
++From: Hongxu Jia <hongxu.jia at windriver.com>
++Date: Fri, 23 Aug 2019 13:52:01 +0000
++Subject: [PATCH] Define gettid() only for glibc < 2.30
++
++glibc 2.30 has added this API, so let us use that when possible
++
++Upstream-Status: Pending
++Signed-off-by: Khem Raj <raj.khem at gmail.com>
++
++Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
++---
++ src/core/lib/gpr/log_linux.cc | 4 ++++
++ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++++
++ 2 files changed, 8 insertions(+)
++
++diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
++index 561276f..25a7486 100644
++--- a/src/core/lib/gpr/log_linux.cc
+++++ b/src/core/lib/gpr/log_linux.cc
++@@ -40,7 +40,11 @@
++ #include <time.h>
++ #include <unistd.h>
++
+++#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29)
+++#include <unistd.h>
+++#else
++ static long gettid(void) { return syscall(__NR_gettid); }
+++#endif
++
++ void gpr_log(const char* file, int line, gpr_log_severity severity,
++ const char* format, ...) {
++diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
++index 06a382c..ec321f2 100644
++--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++++ b/src/core/lib/iomgr/ev_epollex_linux.cc
++@@ -1150,8 +1150,12 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
++ }
++
++ #ifndef NDEBUG
+++#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29)
+++#include <unistd.h>
+++#else
++ static long gettid(void) { return syscall(__NR_gettid); }
++ #endif
+++#endif
++
++ /* pollset->mu lock must be held by the caller before calling this.
++ The function pollset_work() may temporarily release the lock (pollset->po.mu)
++--
++2.17.1
++
+--
+2.17.1
+
Deleted: python-3.8.patch
===================================================================
--- python-3.8.patch 2019-10-29 16:15:36 UTC (rev 520927)
+++ python-3.8.patch 2019-10-29 16:15:57 UTC (rev 520928)
@@ -1,70 +0,0 @@
-From 3a48a5c1541daa1fc3f49b9dbe0da247e7cd90f3 Mon Sep 17 00:00:00 2001
-From: Yong Tang <yong.tang.github at outlook.com>
-Date: Mon, 21 Oct 2019 14:39:33 +0000
-Subject: [PATCH] Fix build failures for python 3.8
-
-This fix tries to address the issue raised in 33543 where
-tensorflow build on python 3.8 failed.
-
-This fix fixed the issue as was suggested in 33543 and pip
-builds finished successfully.
-
-NOTE: tensorflow depends on h5py which does not have python 3.8
-support yet, as such a release version of tensorflow for python 3.8
-may have to wait for h5py first.
-
-Signed-off-by: Yong Tang <yong.tang.github at outlook.com>
----
- tensorflow/python/eager/pywrap_tfe_src.cc | 4 ++--
- tensorflow/python/lib/core/bfloat16.cc | 2 +-
- tensorflow/python/lib/core/ndarray_tensor_bridge.cc | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/tensorflow/python/eager/pywrap_tfe_src.cc b/tensorflow/python/eager/pywrap_tfe_src.cc
-index cfae44af209f..109bfe0579b0 100644
---- a/tensorflow/python/eager/pywrap_tfe_src.cc
-+++ b/tensorflow/python/eager/pywrap_tfe_src.cc
-@@ -1431,7 +1431,7 @@ static PyTypeObject TFE_Py_Tape_Type = {
- sizeof(TFE_Py_Tape), /* tp_basicsize */
- 0, /* tp_itemsize */
- &TFE_Py_Tape_Delete, /* tp_dealloc */
-- nullptr, /* tp_print */
-+ 0, /* tp_print */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
-@@ -1469,7 +1469,7 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = {
- sizeof(TFE_Py_ForwardAccumulator), /* tp_basicsize */
- 0, /* tp_itemsize */
- &TFE_Py_ForwardAccumulatorDelete, /* tp_dealloc */
-- nullptr, /* tp_print */
-+ 0, /* tp_print */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
-diff --git a/tensorflow/python/lib/core/bfloat16.cc b/tensorflow/python/lib/core/bfloat16.cc
-index fde3a8377028..54be76375c9c 100644
---- a/tensorflow/python/lib/core/bfloat16.cc
-+++ b/tensorflow/python/lib/core/bfloat16.cc
-@@ -317,7 +317,7 @@ PyTypeObject PyBfloat16_Type = {
- sizeof(PyBfloat16), // tp_basicsize
- 0, // tp_itemsize
- nullptr, // tp_dealloc
-- nullptr, // tp_print
-+ 0, // tp_print
- nullptr, // tp_getattr
- nullptr, // tp_setattr
- nullptr, // tp_compare / tp_reserved
-diff --git a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc
-index 16f693418615..03ff77100d2e 100644
---- a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc
-+++ b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc
-@@ -86,7 +86,7 @@ PyTypeObject TensorReleaserType = {
- 0, /* tp_itemsize */
- /* methods */
- TensorReleaser_dealloc, /* tp_dealloc */
-- nullptr, /* tp_print */
-+ 0, /* tp_print */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_compare */
Copied: tensorflow/repos/community-staging-x86_64/python-3.8.patch (from rev 520927, tensorflow/trunk/python-3.8.patch)
===================================================================
--- python-3.8.patch (rev 0)
+++ python-3.8.patch 2019-10-29 16:15:57 UTC (rev 520928)
@@ -0,0 +1,70 @@
+From 3a48a5c1541daa1fc3f49b9dbe0da247e7cd90f3 Mon Sep 17 00:00:00 2001
+From: Yong Tang <yong.tang.github at outlook.com>
+Date: Mon, 21 Oct 2019 14:39:33 +0000
+Subject: [PATCH] Fix build failures for python 3.8
+
+This fix tries to address the issue raised in 33543 where
+tensorflow build on python 3.8 failed.
+
+This fix fixed the issue as was suggested in 33543 and pip
+builds finished successfully.
+
+NOTE: tensorflow depends on h5py which does not have python 3.8
+support yet, as such a release version of tensorflow for python 3.8
+may have to wait for h5py first.
+
+Signed-off-by: Yong Tang <yong.tang.github at outlook.com>
+---
+ tensorflow/python/eager/pywrap_tfe_src.cc | 4 ++--
+ tensorflow/python/lib/core/bfloat16.cc | 2 +-
+ tensorflow/python/lib/core/ndarray_tensor_bridge.cc | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tensorflow/python/eager/pywrap_tfe_src.cc b/tensorflow/python/eager/pywrap_tfe_src.cc
+index cfae44af209f..109bfe0579b0 100644
+--- a/tensorflow/python/eager/pywrap_tfe_src.cc
++++ b/tensorflow/python/eager/pywrap_tfe_src.cc
+@@ -1431,7 +1431,7 @@ static PyTypeObject TFE_Py_Tape_Type = {
+ sizeof(TFE_Py_Tape), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ &TFE_Py_Tape_Delete, /* tp_dealloc */
+- nullptr, /* tp_print */
++ 0, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+@@ -1469,7 +1469,7 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = {
+ sizeof(TFE_Py_ForwardAccumulator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ &TFE_Py_ForwardAccumulatorDelete, /* tp_dealloc */
+- nullptr, /* tp_print */
++ 0, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+diff --git a/tensorflow/python/lib/core/bfloat16.cc b/tensorflow/python/lib/core/bfloat16.cc
+index fde3a8377028..54be76375c9c 100644
+--- a/tensorflow/python/lib/core/bfloat16.cc
++++ b/tensorflow/python/lib/core/bfloat16.cc
+@@ -317,7 +317,7 @@ PyTypeObject PyBfloat16_Type = {
+ sizeof(PyBfloat16), // tp_basicsize
+ 0, // tp_itemsize
+ nullptr, // tp_dealloc
+- nullptr, // tp_print
++ 0, // tp_print
+ nullptr, // tp_getattr
+ nullptr, // tp_setattr
+ nullptr, // tp_compare / tp_reserved
+diff --git a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc
+index 16f693418615..03ff77100d2e 100644
+--- a/tensorflow/python/lib/core/ndarray_tensor_bridge.cc
++++ b/tensorflow/python/lib/core/ndarray_tensor_bridge.cc
+@@ -86,7 +86,7 @@ PyTypeObject TensorReleaserType = {
+ 0, /* tp_itemsize */
+ /* methods */
+ TensorReleaser_dealloc, /* tp_dealloc */
+- nullptr, /* tp_print */
++ 0, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_compare */
More information about the arch-commits
mailing list