TensorFlow-GPU not finding GPU



我在Python 3.7 venv上安装了tensorflow-gpu 1.15.2。我没有安装tensorflow程序包。

我安装了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?我有没有安装错误?

哦,似乎100指的是CUDA 10.0,所以CUDA 9.0有***90.dll文件,CUDA 10.2有***102.dll文件。

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

最新更新