[英]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. 我已经在装有NVIDIA GTX 1080显卡的计算机上安装了CUDA 9.0。 When I run the command
nvcc --version
then I get: 当我运行命令
nvcc --version
我得到:
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. 但是我尝试了TensorFlow官方网站上的步骤来安装具有GPU支持的TF,但是它仍然使用CPU。
I have tried pip
install and Anaconda
install, all was the same result. 我尝试了
pip
安装和Anaconda
安装,所有结果都是相同的。 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. 没有人能够检测到GPU,然后我在网上尝试了许多其他教程,他们可以检测到GPU,但我没有。
What can be the reason, is there any changing in the new GPU version of TF? 是什么原因,新的TF GPU版本有什么变化吗? If yes, then what is the latest documentation to install TF with GPU support, if not, then where I am doing wrong.
如果是,那么安装带有GPU支持的TF的最新文档是什么,如果没有,那么我做错了。
Thanks! 谢谢!
Update1: Tensorflow really wastes my time. Update1 : Tensorflow真的浪费我的时间。 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.
非常烦人,起初我决定从源代码构建TF,将其与CUDA 10一起使用,但是在OS Windows 10和Ubuntu 18.04上,我都无法成功构建它。 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.
所以我放弃了,然后我决定使用CUDA 9.0,在Ubuntu 18.04中不支持CUDA 9.0,所以我回到了Windows,但即使是TF的预构建库仍然无法正常工作,真令人讨厌。
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? 我不知道为什么TF仍使用已经正式发布的CUDA 10.0的CUDA 9.0,而TF仍不支持Python 3.7? amazing not?
不可思议吗? and the same thing with MS Build Tools 2015, which 2017 already exist, and many more tools.
与MS Build Tools 2015(已存在2017)和更多工具相同。 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...
TF中继了旧版本的工具,这对于某些人来说是一个很大的问题,他们必须卸载仍在使用的新版本,这很烦人...
Update2: nvidia-smi
output: Update2:
nvidia-smi
输出:
+-----------------------------------------------------------------------------+
| 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.
这可能对其他人有所帮助。这是TF 1.12的错误,我已经删除并重新安装了TF 1.11,它可以检测GPU。
Some suggestions to TF team: 给TF小组的一些建议:
Till now I found the TF the most annoying framework, building and installing. 直到现在,我发现TF是最烦人的框架,无法构建和安装。 TF is very sensitive the happening of errors probability in both building or installing is very high.
TF非常敏感,无论是在构建还是在安装中,发生错误的可能性都很高。
Good Luck!! 祝好运!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.