简体   繁体   English

Tensorflow GPU:错误说。dll 文件未找到,但确实存在

[英]Tensorflow GPU: Error says .dll file not found, but it does exist

I've been trying to get CUDA to work with TensorFlow for a while now because the neural nets I've been building are now taking hours to train on my CPU, and it'd be great to get that big speed boost.我一直在尝试让 CUDA 与 TensorFlow 一起工作一段时间,因为我一直在构建的神经网络现在需要数小时才能在我的 CPU 上进行训练,而获得如此大的速度提升会很棒。 However, whenever I try to use it with TensorFlow (it works with PyTorch, but I want to learn multiple APIs), it tells me that one of the.dll files needed to run CUDA doesn't exist, when it actually does. However, whenever I try to use it with TensorFlow (it works with PyTorch, but I want to learn multiple APIs), it tells me that one of the.dll files needed to run CUDA doesn't exist, when it actually does.

I've downloaded and replaced that.dll with other versions from dll-files.com.我已经下载并用 dll-files.com 中的其他版本替换了 that.dll。 I've tried uninstalling and reinstalling TensorFlow, CUDA, and cuDNN.我尝试卸载并重新安装 TensorFlow、CUDA 和 cuDNN。 I've tried different versions of CUDA, but that only caused all the.dll files to not be found (and yes, I did change the CUDA_PATH value).我尝试了不同版本的 CUDA,但这只会导致找不到所有 .dll 文件(是的,我确实更改了 CUDA_PATH 值)。 I've tried switching the PATH between C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0 and C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin to see if that changed anything. I've tried switching the PATH between C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0 and C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin to see if that changed anything.

If anyone could help with this, that would be much appreciated.如果有人可以提供帮助,那将不胜感激。

The errors I get when I run tf.test.is_gpu_available()我运行 tf.test.is_gpu_available() 时遇到的错误

The file existing文件存在

Have you checked if your TF version was compatible with your CUDA version?您是否检查过您的 TF 版本是否与您的 CUDA 版本兼容?

Check the compatibility matrix here: https://www.tensorflow.org/install/source#tested_build_configurations在此处查看兼容性矩阵: https://www.tensorflow.org/install/source#tested_build_configurations

Unless you compile TF from source, CUDA 11 is not supported yet.除非您从源代码编译 TF,否则尚不支持 CUDA 11。

In any case, I would avoid downloading dll from the website you mentioned.无论如何,我都会避免从您提到的网站下载 dll。

Try installing a different older version of the CUDA toolkit on top of the version you have installed already.尝试在已安装的版本之上安装不同的旧版本 CUDA 工具包。 It fixed it for me however I also had to import all the previous dlls from the latest cuDNN toolkit into the new legacy CUDA toolkit installs as well.它为我修复了它,但是我还必须将所有以前的 dll 从最新的 cuDNN 工具包导入到新的旧版 CUDA 工具包安装中。

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

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