Date: Thursday, June 22, 2017 @ 06:55:34 Author: svenstaro Revision: 239452
upgpkg: tensorflow 1.2.0-1 Added: tensorflow/trunk/10868.patch Modified: tensorflow/trunk/PKGBUILD -------------+ 10868.patch | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PKGBUILD | 15 ++++++--- 2 files changed, 99 insertions(+), 5 deletions(-) Added: 10868.patch =================================================================== --- 10868.patch (rev 0) +++ 10868.patch 2017-06-22 06:55:34 UTC (rev 239452) @@ -0,0 +1,89 @@ +From eb197c45eda55b1047b00f1136a4fec2b8adb2d5 Mon Sep 17 00:00:00 2001 +From: Todd Wang <[email protected]> +Date: Tue, 20 Jun 2017 14:16:26 -0700 +Subject: [PATCH 1/3] [XLA] Explicitly instantiate Permute template func + +This is an attempted fix for older compilers that can't deduce the template args. +--- + tensorflow/compiler/xla/service/llvm_ir/ir_array.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc +index e401305ae73..b14104be6ad 100644 +--- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc ++++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc +@@ -158,7 +158,7 @@ IrArray::Index IrArray::Index::SourceIndexOfTranspose( + tensorflow::gtl::ArraySlice<int64> dimension_mapping, + llvm::IRBuilder<>* builder) const { + std::vector<llvm::Value*> operand_multidim_index = +- Permute(dimension_mapping, multidim()); ++ Permute<std::vector, llvm::Value*>(dimension_mapping, multidim()); + if (linear() != nullptr && + ShapeUtil::TransposeIsBitcast(operand_shape, shape, dimension_mapping)) { + return Index(operand_multidim_index, linear(), operand_shape); + +From 2df6cd3acd71a6dcf459e92c26ac426c90a57be4 Mon Sep 17 00:00:00 2001 +From: Todd Wang <[email protected]> +Date: Wed, 21 Jun 2017 17:51:55 -0700 +Subject: [PATCH 2/3] Another try + +--- + tensorflow/compiler/xla/util.h | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/tensorflow/compiler/xla/util.h b/tensorflow/compiler/xla/util.h +index 42d5c1d1550..32aa81d1f42 100644 +--- a/tensorflow/compiler/xla/util.h ++++ b/tensorflow/compiler/xla/util.h +@@ -195,16 +195,23 @@ bool IsPermutation(tensorflow::gtl::ArraySlice<int64> permutation, int64 rank); + // 2. permutation.size() == input.size(). + template <template <typename...> class C, typename T> + std::vector<T> Permute(tensorflow::gtl::ArraySlice<int64> permutation, +- C<T> input_) { +- tensorflow::gtl::ArraySlice<T> input(input_); +- CHECK(IsPermutation(permutation, input.size())); +- std::vector<T> output(input.size()); ++ C<T> input) { ++ tensorflow::gtl::ArraySlice<T> data(input); ++ CHECK(IsPermutation(permutation, data.size())); ++ std::vector<T> output(data.size()); + for (size_t i = 0; i < permutation.size(); ++i) { +- output[permutation[i]] = input[i]; ++ output[permutation[i]] = data[i]; + } + return output; + } + ++// Override of the above that works around compile failures with vectors. ++template <typename T> ++std::vector<T> Permute(tensorflow::gtl::ArraySlice<int64> permutation, ++ const std::vector<T>& input) { ++ return Permute<std::vector, T>(permutation, input); ++} ++ + // Inverts a permutation, i.e., output_permutation[input_permutation[i]] = i. + std::vector<int64> InversePermutation( + tensorflow::gtl::ArraySlice<int64> input_permutation); + +From 03da6113468d6b256a755d0521b9b239eaf8b6a9 Mon Sep 17 00:00:00 2001 +From: Todd Wang <[email protected]> +Date: Wed, 21 Jun 2017 17:54:15 -0700 +Subject: [PATCH 3/3] Update ir_array.cc + +--- + tensorflow/compiler/xla/service/llvm_ir/ir_array.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc +index b14104be6ad..e401305ae73 100644 +--- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc ++++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc +@@ -158,7 +158,7 @@ IrArray::Index IrArray::Index::SourceIndexOfTranspose( + tensorflow::gtl::ArraySlice<int64> dimension_mapping, + llvm::IRBuilder<>* builder) const { + std::vector<llvm::Value*> operand_multidim_index = +- Permute<std::vector, llvm::Value*>(dimension_mapping, multidim()); ++ Permute(dimension_mapping, multidim()); + if (linear() != nullptr && + ShapeUtil::TransposeIsBitcast(operand_shape, shape, dimension_mapping)) { + return Index(operand_multidim_index, linear(), operand_shape); Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-06-22 06:24:07 UTC (rev 239451) +++ PKGBUILD 2017-06-22 06:55:34 UTC (rev 239452) @@ -4,19 +4,24 @@ pkgbase=tensorflow pkgname=(tensorflow tensorflow-cuda python-tensorflow python-tensorflow-cuda) -pkgver=1.1.0 -pkgrel=4 +pkgver=1.2.0 +pkgrel=1 pkgdesc="Library for computation using data flow graphs for scalable machine learning" url="https://www.tensorflow.org/" license=('Apache2') arch=('x86_64') makedepends=('git' 'bazel' 'python-numpy' 'gcc5' 'cuda' 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools') -source=("https://github.com/tensorflow/tensorflow/archive/v${pkgver}.tar.gz") -sha512sums=('5dc0e13742c06cbc6407cc54de02d825928e9c16eeee169b198bbec95acd2a9af49bf3df092c99be1e3adadd40c5f4edf8735c6ad67a370c90c1e74146c32eac') +source=("https://github.com/tensorflow/tensorflow/archive/v${pkgver}.tar.gz" + 10868.patch) +sha512sums=('7f51060e35bdf313f043fdf99c174ec7a734463c5ea7436380428fd3900421c656b61d00fb9c7492b97172a0bd963502dc0ff4cabd31d91297ed99065842647d' + '90940827ea6cbc6694b14ea276a37c5f8af027317873d67a8b40802d8d75a81984c283335bf62cc5b5fa63023c9cc9b414a145d3019124127c5f15472bfdfcec') prepare() { + patch -Np1 -d tensorflow-${pkgver} < ${srcdir}/10868.patch + cp -r tensorflow-${pkgver} tensorflow-${pkgver}-cuda # These environment variables influence the behavior of the configure call below. + export TF_NEED_MKL=0 export PYTHON_BIN_PATH=/usr/bin/python export USE_DEFAULT_PYTHON_LIB_PATH=1 export CC_OPT_FLAGS="-march=x86-64" @@ -42,7 +47,7 @@ export TF_NEED_CUDA=1 export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-5 # For next version instead of the gcc-5 stuff: - # export TF_CUDA_CLANG=1 + 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')
