Tensorflow无法使用当前的bazel进行编译

时间:2019-01-15 18:59:04

标签: tensorflow compilation bazel

我尝试使用带bazel的CUDA 10.0编译tensorflow

bazel build --verbose_failures  --config=opt --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package

最后我得到以下错误:

INFO: From Compiling tensorflow/core/grappler/grappler_item.cc [for host]:
In file included from tensorflow/core/grappler/grappler_item.cc:27:0:
./tensorflow/core/grappler/utils.h: In function 'int   tensorflow::grappler::NodePositionIfSameNode(const string&, const string&)':
./tensorflow/core/grappler/utils.h:130:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   std::distance(input_it, input_name.end()) < node_name.size()) {
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
ERROR: /home/harvey/Src/tensorflow/tensorflow/core/kernels/BUILD:119:1: error while parsing .d file: /home/harvey/.cache/bazel/_bazel_harvey/a8056825e4a757c07b20aa84fa220b48/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/core/kernels/_objs/strided_slice_op_gpu/strided_slice_op_gpu.cu.pic.d (No such file or directory)
sh: 1: cuda/bin/nvcc: not found
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 70.321s, Critical Path: 23.78s
INFO: 376 processes: 376 local.
FAILED: Build did NOT complete successfully

我正在使用Nvidia驱动程序4.10,CUDA10.0,cudnn 2.4.1,nccl 2.3.7

挡板版本:

INFO: Invocation ID: fb26ca1b-2546-4ea7-8fb4-ca9a97facc19
Build label: 0.21.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Dec 19 12:58:44 2018 (1545224324)
Build timestamp: 1545224324
Build timestamp as int: 154522432

你们对我有什么建议吗?非常感谢你!

0 个答案:

没有答案