summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnihcam2018-04-25 20:51:02 +0800
committerEnihcam2018-04-25 20:51:02 +0800
commit7e0643719a91d660783922cd240deffeb434d42b (patch)
tree8fed4001ff3552f3bb201bede50c6f8189fc4af0
downloadaur-7e0643719a91d660783922cd240deffeb434d42b.tar.gz
v1.7.0
-rw-r--r--.SRCINFO35
-rw-r--r--17508.patch28
-rw-r--r--PKGBUILD93
-rw-r--r--no_trisycl.patch10
4 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..eac36488b8c4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,35 @@
+pkgbase = tensorflow-computecpp
+ pkgdesc = Library for computation using data flow graphs for scalable machine learning (backend with ComputeCpp)
+ pkgver = 1.7.0
+ pkgrel = 1
+ url = https://github.com/tensorflow/tensorflow
+ arch = x86_64
+ license = APACHE
+ makedepends = opencl-icd-loader
+ makedepends = computecpp
+ makedepends = bazel
+ makedepends = python-numpy
+ makedepends = python-pip
+ makedepends = python-wheel
+ makedepends = python-setuptools
+ depends = opencl-icd-loader
+ depends = computecpp
+ source = https://github.com/tensorflow/tensorflow/archive/v1.7.0.tar.gz
+ source = 17508.patch
+ source = no_trisycl.patch
+ sha512sums = 68fffad324be7f6e3726ea539670572729bd72c7dc935edfdb31771f821f1a8fe90c3d7c293969f660a25e5fd76249cc9b74c5f8511c7bd3e2189d3328044f29
+ sha512sums = cb2880767532275f55f91ab66b29687fceadcadb8e23608d1e59b35a2899239882367ac38465a5e635f17378286093da0ede115668e23d651776d962ddc35ea9
+ sha512sums = 9081323af38496fbaff4ae79dd7dd291bdebe83758c715fa2d302d3733169a3fb347427b2b0f0268df91bd6b681c57d938fabfe7da3abdb1aa8fc49261a3d750
+
+pkgname = tensorflow-computecpp
+ provides = tensorflow
+ conflicts = tensorflow
+
+pkgname = python-tensorflow-computecpp
+ depends = python-numpy
+ depends = python-protobuf
+ depends = absl-py
+ optdepends = python-werkzeug: for using tensorboard
+ provides = python-tensorflow
+ conflicts = python-tensorflow
+
diff --git a/17508.patch b/17508.patch
new file mode 100644
index 000000000000..feee9c2fa809
--- /dev/null
+++ b/17508.patch
@@ -0,0 +1,28 @@
+From 340327dc8cc637fef01e66f7dd7cae68ce259b94 Mon Sep 17 00:00:00 2001
+From: Yun Peng <pcloudy@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(
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..063859f97bc2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,93 @@
+# Maintainer: enihcam <nanericwang at the google email domain which is .com>
+
+pkgbase=tensorflow-computecpp
+pkgname=(tensorflow-computecpp python-tensorflow-computecpp)
+pkgver=1.7.0
+pkgrel=1
+pkgdesc="Library for computation using data flow graphs for scalable machine learning (backend with ComputeCpp)"
+url="https://github.com/tensorflow/tensorflow"
+license=('APACHE')
+arch=('x86_64')
+depends=(opencl-icd-loader computecpp)
+makedepends=(opencl-icd-loader computecpp bazel python-numpy python-pip python-wheel python-setuptools)
+source=("${url}/archive/v${pkgver}.tar.gz"
+ 17508.patch
+ no_trisycl.patch)
+sha512sums=('68fffad324be7f6e3726ea539670572729bd72c7dc935edfdb31771f821f1a8fe90c3d7c293969f660a25e5fd76249cc9b74c5f8511c7bd3e2189d3328044f29'
+ 'cb2880767532275f55f91ab66b29687fceadcadb8e23608d1e59b35a2899239882367ac38465a5e635f17378286093da0ede115668e23d651776d962ddc35ea9'
+ '9081323af38496fbaff4ae79dd7dd291bdebe83758c715fa2d302d3733169a3fb347427b2b0f0268df91bd6b681c57d938fabfe7da3abdb1aa8fc49261a3d750')
+prepare() {
+ patch -Np1 -i ${srcdir}/17508.patch -d tensorflow-${pkgver}
+ patch -Np1 -i ${srcdir}/no_trisycl.patch -d tensorflow-${pkgver}
+
+ # 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 HOST_CXX_COMPILER=/usr/bin/g++
+ export HOST_C_COMPILER=/usr/bin/gcc
+ export CC_OPT_FLAGS="-march=native -O2"
+ export TF_CUDA_CLANG=0
+ export TF_NEED_CUDA=0
+ export TF_NEED_JEMALLOC=0
+ export TF_NEED_GCP=0
+ export TF_NEED_HDFS=0
+ export TF_ENABLE_XLA=1
+ export TF_NEED_GDR=0
+ export TF_NEED_VERBS=0
+ export TF_NEED_OPENCL=1
+ export TF_NEED_MPI=0
+ export TF_NEED_S3=0
+ export TF_NEED_KAFKA=0
+ export TF_NEED_TENSORRT=0
+ export TF_SET_ANDROID_WORKSPACE=0
+ export TF_NEED_OPENCL_SYCL=1
+ export TF_NEED_COMPUTECPP=1
+ export COMPUTECPP_TOOLKIT_PATH=/opt/ComputeCpp-CE
+ export COMPUTE=:0
+
+ # make sure the proxy variables are in all caps, otherwise bazel ignores them
+ export HTTP_PROXY=`echo $http_proxy | sed -e 's/\/$//'`
+ export HTTPS_PROXY=`echo $https_proxy | sed -e 's/\/$//'`
+}
+
+build() {
+ # _bazel_09_fix="--incompatible_load_argument_is_label=false"
+ cd ${srcdir}/tensorflow-${pkgver}
+
+ ./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
+}
+
+package_tensorflow-computecpp() {
+ conflicts=(tensorflow)
+ provides=(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_python-tensorflow-computecpp() {
+ conflicts=(python-tensorflow)
+ provides=(python-tensorflow)
+ depends=(python-numpy python-protobuf absl-py)
+ optdepends=('python-werkzeug: for using tensorboard')
+
+ 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
+}
diff --git a/no_trisycl.patch b/no_trisycl.patch
new file mode 100644
index 000000000000..b57f9f03844d
--- /dev/null
+++ b/no_trisycl.patch
@@ -0,0 +1,10 @@
+--- old/third_party/sycl/sycl/BUILD.tpl 2018-03-29 12:18:40.000000000 +0800
++++ new/third_party/sycl/sycl/BUILD.tpl 2018-04-25 20:37:48.874124617 +0800
+@@ -21,7 +21,7 @@
+ name = "using_sycl_trisycl",
+ define_values = {
+ "using_sycl": "true",
+- "using_trisycl": "false",
++ "using_trisycl": "true",
+ },
+ )