Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow does not recognize GPU after installing CUDA toolkit and cuDNN

I have a 1070 gtx. when I ran:

> sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

I got

> 2017-05-24 21:01:07.959988: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
> 2017-05-24 21:01:07.960018: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
> 2017-05-24 21:01:07.960030: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
> Device mapping: no known devices.
> 2017-05-24 21:01:07.962291: I tensorflow/core/common_runtime/direct_session.cc:257] Device mapping:

results from nvidia-smi:

Wed May 24 21:47:25 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39                 Driver Version: 375.39                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    Off  | 0000:02:00.0      On |                  N/A |
|  0%   44C    P8     8W / 180W |    354MiB /  8112MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1179    G   /usr/lib/xorg/Xorg                             184MiB |
|    0      2343    G   compiz                                         120MiB |
|    0     26145    G   ...el-token=A9030FB8E905376BBEE74D68F09DFE81    47MiB |
+-----------------------------------------------------------------------------+

This tells me tensorflow is not using GPU. I have installed CUDA 8.0, cuDNN 5.1, and tensorflow 1.1.0. I'm not sure what's wrong. Please help.

like image 242
yangliu2 Avatar asked Feb 18 '26 18:02

yangliu2


1 Answers

As @Alexander Yau pointed out, uninstalling the regular tensoflow package did the trick. Thanks.

like image 85
yangliu2 Avatar answered Feb 20 '26 08:02

yangliu2