【问题标题】:Compiling tensorflow from source: Undefined reference to tensorflow::functor::FillFunctor从源代码编译 tensorflow:未定义对 tensorflow::functor::FillFunctor 的引用
【发布时间】:2016-05-06 23:50:25
【问题描述】:

从支持 GPU 的源代码编译 tensorflow 时,我得到:

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

我尝试了不同的 bazel 版本(0.1.1 和 0.1.4),但我得到了同样的错误。有什么想法吗?

【问题讨论】:

    标签: tensorflow


    【解决方案1】:

    我不确定是什么导致了问题,但是从 Ubuntu 12.04 升级到 14.04 将其删除。

    【讨论】:

      【解决方案2】:

      这很可能是由于使用了旧版本的 c 编译器。通过升级您的 Ubuntu,您还升级了 gcc,它允许 TensorFlow 使用 bazel 构建。

      无法升级编译器的可以尝试本地gcc,看这里: https://github.com/bazelbuild/bazel/issues/649

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-08-22
        • 2022-06-17
        • 2016-11-02
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多