简体   繁体   中英

What is the reason that TensorFlow does not detect GPU on Windows

I have installed CUDA 9.0 on my machine which has the NVIDIA GTX 1080 graphics cards. When I run the command nvcc --version then I get:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017
Cuda compilation tools, release 9.0, V9.0.176

But I have tried the steps from the TensorFlow official site to install TF with GPU support, but it still using the CPU.

I have tried pip install and Anaconda install, all was the same result. No one was able to detect GPU, then I have tried many other tutorials on the web, which they were able to detect the GPU, but I am not.

What can be the reason, is there any changing in the new GPU version of TF? If yes, then what is the latest documentation to install TF with GPU support, if not, then where I am doing wrong.

Thanks!

Update1: Tensorflow really wastes my time. Very annoying, at the first I decided to build TF from source, to use it with CUDA 10, but on both OS Windows 10 and Ubuntu 18.04 I was unable to build it successfully. So I gave up, then I decided to use with CUDA 9.0, which is not supported in Ubuntu 18.04, so I came back to windows, but even still the prebuilt library of TF not working, really annoying.

I don't know why TF still using CUDA 9.0 which CUDA 10.0 already officially released, and TF still not supporting Python 3.7? amazing not? and the same thing with MS Build Tools 2015, which 2017 already exist, and many more tools. TF relays on old versions of the tools which make a lot of problem for some people that they must uninstall their new versions which still using, it is very annoying...

Update2: nvidia-smi output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 417.71       Driver Version: 417.71       CUDA Version: 9.0      |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1080   WDDM  | 00000000:01:00.0  On |                  N/A |
| 27%   35C    P8     8W / 180W |    498MiB /  8192MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1264    C+G   Insufficient Permissions                   N/A      |
|    0      2148    C+G   ...0108.0_x64__8wekyb3d8bbwe\HxOutlook.exe N/A      |
|    0      4360    C+G   ...mmersiveControlPanel\SystemSettings.exe N/A      |
|    0      7332    C+G   C:\Windows\explorer.exe                    N/A      |
|    0      7384    C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A      |
|    0      8488    C+G   ...dows.Cortana_cw5n1h2txyewy\SearchUI.exe N/A      |
|    0      9704    C+G   ...osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A      |
|    0     10588    C+G   ...al\Google\Chrome\Application\chrome.exe N/A      |
|    0     10904    C+G   ...x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A      |
|    0     12608    C+G   ...DIA GeForce Experience\NVIDIA Share.exe N/A      |
|    0     13000    C+G   ...241.0_x64__8wekyb3d8bbwe\Calculator.exe N/A      |
|    0     14668    C+G   ...ng4wbp0\app\DellMobileConnectClient.exe N/A      |
|    0     17628    C+G   ...2.0_x64__8wekyb3d8bbwe\WinStore.App.exe N/A      |
|    0     18060    C+G   ...oftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe N/A      |
+-----------------------------------------------------------------------------+

I finally figured out the problem. this may help others It is a bug with TF 1.12, I have removed and reinstalled TF 1.11 which it is able to detect GPU.

Some suggestions to TF team:

  • Before releasing a new version, please make sure that it is working in all OS systems without any bugs (the bugs like this which I against is really a very low lever bug)
  • Please also refresh your third-party libraries to support the newest versions, eg: CUDA 10, which I had installed in my machine, but because of installing TF I stepped back to 9.0; annoying. VS 2015, Python 3.7, and and and ... as well.
  • Please update the documentation, for both install and building from source, describe everything clearly, what needs, what to install, how to build all of the need tools and utils must be described clearly. In the documentation, I found that building TF from source is very very easy, but in reality was not, there I found a lot of errors like the others, so I was unable to build from source.

Till now I found the TF the most annoying framework, building and installing. TF is very sensitive the happening of errors probability in both building or installing is very high.

Good Luck!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM