[arch-commits] Commit in tensorflow/repos (3 files)
Sven-Hendrik Haase
svenstaro at archlinux.org
Sun May 20 11:06:25 UTC 2018
Date: Sunday, May 20, 2018 @ 11:06:25
Author: svenstaro
Revision: 325231
archrelease: copy trunk to community-testing-x86_64
Added:
tensorflow/repos/community-testing-x86_64/
tensorflow/repos/community-testing-x86_64/17508.patch
(from rev 325230, tensorflow/trunk/17508.patch)
tensorflow/repos/community-testing-x86_64/PKGBUILD
(from rev 325230, tensorflow/trunk/PKGBUILD)
-------------+
17508.patch | 28 +++++++
PKGBUILD | 221 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 249 insertions(+)
Copied: tensorflow/repos/community-testing-x86_64/17508.patch (from rev 325230, tensorflow/trunk/17508.patch)
===================================================================
--- community-testing-x86_64/17508.patch (rev 0)
+++ community-testing-x86_64/17508.patch 2018-05-20 11:06:25 UTC (rev 325231)
@@ -0,0 +1,28 @@
+From 340327dc8cc637fef01e66f7dd7cae68ce259b94 Mon Sep 17 00:00:00 2001
+From: Yun Peng <pcloudy at google.com>
+Date: Wed, 7 Mar 2018 13:50:31 +0100
+Subject: [PATCH] jpeg.BUILD: Using --cpu instead of --android_cpu
+
+---
+ third_party/jpeg/jpeg.BUILD | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/third_party/jpeg/jpeg.BUILD b/third_party/jpeg/jpeg.BUILD
+index 87a23925c43..4418ac32fc4 100644
+--- a/third_party/jpeg/jpeg.BUILD
++++ b/third_party/jpeg/jpeg.BUILD
+@@ -526,12 +526,12 @@ config_setting(
+
+ config_setting(
+ name = "armeabi-v7a",
+- values = {"android_cpu": "armeabi-v7a"},
++ values = {"cpu": "armeabi-v7a"},
+ )
+
+ config_setting(
+ name = "arm64-v8a",
+- values = {"android_cpu": "arm64-v8a"},
++ values = {"cpu": "arm64-v8a"},
+ )
+
+ config_setting(
Copied: tensorflow/repos/community-testing-x86_64/PKGBUILD (from rev 325230, tensorflow/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2018-05-20 11:06:25 UTC (rev 325231)
@@ -0,0 +1,221 @@
+# 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.8.0
+_pkgver=1.8.0
+pkgrel=2
+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")
+sha512sums=('7280e65d26fb3f15d95f7217ee3bc08d1424cd144cf25bf638fa114fa835b2505dfaf457c55700067d24f485b77120973d094ec568e6d1b1054857402f9c352d')
+
+prepare() {
+ 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-5
+ 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 --cxxopt="-I/opt/cuda/include/crt" --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-5
+ 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 --cxxopt="-I/opt/cuda/include/crt" --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)
+ 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)
+ pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
+
+ cd ${srcdir}/tensorflow-${_pkgver}-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:
More information about the arch-commits
mailing list