kerouac
kerouac

Reputation: 370

Tensorflow with gpu support installation error - the specified --crosstool_top is not a valid cc_toolchain_suite rule

I've been trying to install tensorflow with GPU support using these steps: http://www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.html and also using: http://thelazylog.com/install-tensorflow-with-gpu-support-on-sandbox-redhat/

This is the error message that I'm getting when I try to run the bazel build command for building the tensorflow pip package (with the --config-cuda flag set):

The specified --crosstool_top '//third_party/gpus/crosstool:crosstool' is not a valid cc_toolchain_suite rule.

What's strange is that if i remove the --config=cuda flag, I don't get the error message while building and I'm able to install tensorflow successfully - but without GPU support.

Upvotes: 5

Views: 2531

Answers (4)

user3076252
user3076252

Reputation: 1937

Also, zlib has been updated since this TF build. You need to check http://www.zlib.net/ to get the latest version and SHA-256, then update tensorflow/workspace.bzl with that information (lines 254-266 in this build). At this time, the correct version info would include the following:

url = "http://zlib.net/zlib-1.2.11.tar.gz",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",

Upvotes: 0

uher
uher

Reputation: 19

Please change the git source version slightly as shown below

$ git clone https://github.com/tensorflow/tensorflow
$ cd tensorflow
// $ git reset --hard 70de76e
$ git reset --hard 287db3a

And please refer the below l https://github.com/tensorflow/tensorflow/issues/4944

Upvotes: 1

Prince Kapoor
Prince Kapoor

Reputation: 11

I was going through same problem and recently found the solution. The problem is with the installation of Bazel which leads to this kind of error.

After installation of bazel from installer, make sure that you would give the correct path to ~./bashrc and also activate the path using source "path-to-your-bin-directory-for-bazel"

Upvotes: 1

Melvin
Melvin

Reputation: 1610

I experienced the same issue, using the nvidia instructions. What I did was to drop the git reset line in the instructions, and it works.

Details (from the error message):

Close, reopen terminal

Run git clone (again), and cd tensorflow

Run ./configure

Bazel build, etc

This may be unrelated, but I experienced an issue with the .whl line, the error message was that the wheel cannot be found or something along those lines. This is the "And finally install the TensorFlow pip package" section. To resolve it in my case, I typed in the terminal all the way to "..._pkg/tensorflow", and then pressed tab for auto-completion. The file name that popped up was significantly longer than that in the guide, but it worked. Also, if anyone face a numpy not installed message based on the nvidia instructions, replace the python-pip and dev with python-numpy and run that line again to install.

Configuration: Fresh Ubuntu 16.04, GTX970M, running driver 367.48 (from CUDA installation), CUDA 8.0, CuDNN 5.1

Full setup path: Fresh Ubuntu, with downloads and 3rd party apps selected during installation. Control panel => Software and updates => Other Software => Canonical ticked Install CUDA using nvidia instructions in CUDA documentation, .deb format CuDNN 5.1 installed, the rest from the nvidia link.

I hope everything works out for you!

(I'm sorry for the poor formatting)

Upvotes: 3

Related Questions