Date: Sunday, January 28, 2018 @ 14:59:10 Author: svenstaro Revision: 287618
archrelease: copy trunk to community-x86_64 Added: tensorflow/repos/community-x86_64/15229.patch (from rev 287617, tensorflow/trunk/15229.patch) tensorflow/repos/community-x86_64/PKGBUILD (from rev 287617, tensorflow/trunk/PKGBUILD) Deleted: tensorflow/repos/community-x86_64/PKGBUILD -------------+ 15229.patch | 37 ++++ PKGBUILD | 447 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 266 insertions(+), 218 deletions(-) Copied: tensorflow/repos/community-x86_64/15229.patch (from rev 287617, tensorflow/trunk/15229.patch) =================================================================== --- 15229.patch (rev 0) +++ 15229.patch 2018-01-28 14:59:10 UTC (rev 287618) @@ -0,0 +1,37 @@ +From d4c33cfc944cbcac7a31811ba8f86448d8cc2e23 Mon Sep 17 00:00:00 2001 +From: Anush Elangovan <an...@nod-labs.com> +Date: Fri, 8 Dec 2017 20:48:23 -0800 +Subject: [PATCH] [XLA] Fix XLA/tfcompile compile error on OSX + +This fixes issue #15196 + +kernel_support_library.cc:99:5: error: no matching function +for call to 'transform' std::transform(function->arg_begin(),.. + +TEST=build tfcompile on OSX (also requires PR#14893) +--- + .../compiler/xla/service/llvm_ir/kernel_support_library.cc | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/tensorflow/compiler/xla/service/llvm_ir/kernel_support_library.cc b/tensorflow/compiler/xla/service/llvm_ir/kernel_support_library.cc +index 5f6f9810c3a..23d2d4e87d2 100644 +--- a/tensorflow/compiler/xla/service/llvm_ir/kernel_support_library.cc ++++ b/tensorflow/compiler/xla/service/llvm_ir/kernel_support_library.cc +@@ -111,8 +111,15 @@ void KernelSupportLibrary::EmitAndCallOutlinedKernel( + ir_builder->SetInsertPoint(return_inst); + + std::vector<llvm::Value*> arg_values; +- std::transform(function->arg_begin(), function->arg_end(), +- std::back_inserter(arg_values), std::addressof<llvm::Value>); ++ /* ++ * clang on OSX doesn't like std::transform or range for loop here. ++ * See https://github.com/tensorflow/tensorflow/issues/15196 ++ */ ++ for (llvm::Function::arg_iterator arg = function->arg_begin(), ++ arg_e = function->arg_end(); ++ arg != arg_e; ++arg) { ++ arg_values.push_back(arg); ++ } + if (null_arg_idx != -1) { + arg_values.insert(arg_values.begin() + null_arg_idx, nullptr); + } Deleted: PKGBUILD =================================================================== --- PKGBUILD 2018-01-28 14:58:51 UTC (rev 287617) +++ PKGBUILD 2018-01-28 14:59:10 UTC (rev 287618) @@ -1,218 +0,0 @@ -# Maintainer: Sven-Hendrik Haase <s...@lutzhaase.com> -# Contributor: Adria Arrufat (archdria) <adria.arrufat+...@protonmail.ch> -# Contributor: Thibault Lorrain (fredszaq) <freds...@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.4.1 -_pkgver=1.4.1 -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' 'gcc6' '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=('618e0a740c79ad9582944a827f43bbdafb1d51a1e621f6f5e5cc7f3f18eb239f0656f81fbbae20c69029a1fa8b4bab56ff5be0907f073eccbe4732e52c7511d6') - -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_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 -} - -build() { - _bazel_09_fix="--incompatible_load_argument_is_label=false" - 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_09_fix} - 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 - # For next version instead of the gcc-6 stuff: - export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-6 - 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 - ./configure - bazel build --cxxopt="-I/opt/cuda/include/crt" --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package ${_bazel_09_fix} - 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_09_fix} - 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 - # For next version instead of the gcc-6 stuff: - export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-6 - 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 - ./configure - bazel build --cxxopt="-I/opt/cuda/include/crt" --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package ${_bazel_09_fix} - 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 python-protobuf) - - 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 python-protobuf) - 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 cuda cudnn python-pycuda python-protobuf) - 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 cuda cudnn python-pycuda python-protobuf) - 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: Copied: tensorflow/repos/community-x86_64/PKGBUILD (from rev 287617, tensorflow/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2018-01-28 14:59:10 UTC (rev 287618) @@ -0,0 +1,229 @@ +# Maintainer: Sven-Hendrik Haase <s...@lutzhaase.com> +# Contributor: Adria Arrufat (archdria) <adria.arrufat+...@protonmail.ch> +# Contributor: Thibault Lorrain (fredszaq) <freds...@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.5.0 +_pkgver=1.5.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' 'gcc6' '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" + 15229.patch) +sha512sums=('63240d72b9946db29279800b1081adc4cc08b6cd7dc35155a529cc335bfc1dd16fb525fb6047f6cc0dcec547a54e7e100698a176ee93f5633965cfab2a8ad9eb' + '3fa052354c1b351430c2a36fa152b50802d8b46a5b22fbf427ba2589932e1ad83ee51f4e1ab1d641b1755ded46b5201f5e0d26b382e2aca72baa63567356a85f') + +prepare() { + # Trick tensorflow into not building Android. The env var + # TF_SET_ANDROID_WORKSPACE does not work for some reason. + sed -i "s/if workspace_has_any_android_rule()/if True/g" tensorflow-${_pkgver}/configure.py + + patch -Np1 -d tensorflow-${_pkgver} -i ${srcdir}/15229.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_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 + # This should work, but doesn't: + # export TF_SET_ANDROID_WORKSPACE=0 +} + +build() { + # _bazel_09_fix="--incompatible_load_argument_is_label=false" + 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_09_fix} + 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 + # For next version instead of the gcc-6 stuff: + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-6 + 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 + ./configure + bazel build --cxxopt="-I/opt/cuda/include/crt" --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package ${_bazel_09_fix} + 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_09_fix} + 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 + # For next version instead of the gcc-6 stuff: + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-6 + 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 + ./configure + bazel build --cxxopt="-I/opt/cuda/include/crt" --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package ${_bazel_09_fix} + 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 python-protobuf) + + 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 python-protobuf) + 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 cuda cudnn python-pycuda python-protobuf) + 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 cuda cudnn python-pycuda python-protobuf) + 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: