繁体   English   中英

TensorFlow-GPU 未找到 GPU

[英]TensorFlow-GPU not finding GPU

我已经在 Python 3.7 venv 上安装了tensorflow-gpu 1.15.2 我没有安装tensorflow package。

我安装了 CUDA 9.0(因为我使用的是 tensorflow 1.15)和 CUDA 9.0 的相应 cuDNN。 当我运行 tensorflow 学习算法时,它使用我的 CPU 而不是我的 GPU。 我跑了:

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

它检测到我的 GPU (1660 Ti) 但它说我缺少大量包裹:

2020-04-25 22:02:12.536321: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2020-04-25 22:02:15.175536: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-04-25 22:02:15.188183: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2020-04-25 22:02:15.234070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: 
name: GeForce GTX 1660 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.875
pciBusID: 0000:27:00.0
2020-04-25 22:02:15.239530: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2020-04-25 22:02:15.242919: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_100.dll'; dlerror: cublas64_100.dll not found
2020-04-25 22:02:15.251483: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_100.dll'; dlerror: cufft64_100.dll not found
2020-04-25 22:02:15.255358: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_100.dll'; dlerror: curand64_100.dll not found
2020-04-25 22:02:15.266446: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_100.dll'; dlerror: cusolver64_100.dll not found
ired libraries for your platform.
Skipping registering GPU devices...
2020-04-25 22:02:15.719511: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-04-25 22:02:15.721901: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186]      0
2020-04-25 22:02:15.723610: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0:   N
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 524594082372294943
]

我在我的电脑上进行了搜索,确实找不到那些 dll 文件。

当我安装 CUDA 时,如果我尝试重新安装,它会显示“显卡驱动程序找不到兼容的显卡硬件”。 我忽略了错误并安装了。 我的程序文件中的相关 CUDA 目录在那里。 但是 cmd 提示符中的nvcc -V确认安装了 CUDA。

一个快速的谷歌似乎建议 CUDA 版本 10+ 有这些库,但安装后我发现没有区别。

我在哪里可以找到这些丢失的 dll? 我是否安装了错误的东西?

Oh it seems the 100 refers to CUDA 10.0, so CUDA 9.0 has ***90.dll files and CUDA 10.2 has ***102.dll files.

为此需要这么多不同的 CUDA 安装真的很烦人!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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