2016-02-09 7 views
1

При компиляции tensorflow из источника с поддержкой GPU я получаю:Компиляция tensorflow из источника: неопределенная ссылка на tensorflow :: функтора :: FillFunctor

bazel build -c opt --config=cuda --verbose_failures //tensorflow/cc:tutorials_example_trainer 
WARNING: Output base '/auto/homes/.cache/bazel/_bazel_/bd4752ce1a89280ab0ba7ef21866f7b1' is on NFS. This may lead to surprising failures and undetermined behavior. 
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing. 
INFO: Found 1 target... 
INFO: From Linking tensorflow/cc/tutorials_example_trainer: 
bazel-out/local_linux-opt/bin/tensorflow/core/libkernels.lo(constant_op.o): In function `tensorflow::ZerosLikeOp<Eigen::GpuDevice, bool>::Compute(tensorflow::OpKernelContext*)': 
constant_op.cc:(.text._ZN10tensorflow11ZerosLikeOpIN5Eigen9GpuDeviceEbE7ComputeEPNS_15OpKernelContextE[_ZN10tensorflow11ZerosLikeOpIN5Eigen9GpuDeviceEbE7ComputeEPNS_15OpKernelContextE]+0x181): undefined reference to `tensorflow::functor::FillFunctor<Eigen::GpuDevice, bool>::operator()(Eigen::GpuDevice const&, Eigen::TensorMap<Eigen::Tensor<bool, 1, 1, long>, 16>, Eigen::TensorMap<Eigen::TensorFixedSize<bool const, Eigen::Sizes<>, 1, long>, 16>)' 
collect2: error: ld returned 1 exit status 

я пробовал разные версии Базэл (0.1.1 и 0.1. 4), но я получаю ту же ошибку. Есть идеи?

ответ

0

Я не уверен, что вызвало проблему, но обновление с Ubuntu 12.04 до 14.04 удалило его.

0

Это, скорее всего, из-за наличия старой версии компилятора c. Обновив Ubuntu, вы также обновили gcc, что позволяет TensorFlow строить с помощью bazel.

Для тех, кто не может обновить компилятор, вы можете попробовать с местным НКУ, смотрите здесь: https://github.com/bazelbuild/bazel/issues/649

Смежные вопросы