Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Illegal ambiguous match on configurable attribute "deps" in //tensorflow/core/grappler/costs:utils: when trying to build Tensorflow with GPU support

I am trying to build Tensorflow on Ubuntu with the command bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=cuda //tensorflow/tools/pip_package:build_pip_package but I get the following error after running ./configure:

Illegal ambiguous match on configurable attribute "deps" in //tensorflow/core/grappler/costs:utils:
@local_config_cuda//cuda:using_clang
@local_config_cuda//cuda:using_nvcc
Multiple matches are not allowed unless one is unambiguously more specialized.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted
INFO: Elapsed time: 30.960s
FAILED: Build did NOT complete successfully (91 packages loaded)

I am not sure what happened. It seems that there is a conflict between using clang and nvcc, but I don't think I've specified using nvcc anywhere during the configuration process. ./configure should have finished without any issue.

Strangely I am not able to find any such bug report on the internet.

Could it be the case that I installed CUDA incorrectly, or is it more likely a bug with the tensorflow configuration?

  • Ubuntu 16.04 LTS
  • CUDA 8.0
  • cuDnn 7.0.1
like image 240
xji Avatar asked Dec 03 '22 21:12

xji


1 Answers

You need to use --config=cuda_clang in your Bazel command, e.g.:

bazel build --config=opt --config=cuda_clang //tensorflow/tools/pip_package:build_pip_package 
like image 77
Nicholas White Avatar answered Dec 06 '22 11:12

Nicholas White