【问题标题】:Tensorflow can not found RTX 3070TensorFlow 找不到 RTX 3070
【发布时间】:2020-12-14 09:24:56
【问题描述】:

当我尝试在我的anaconda 环境中安装tensorflow-gpu 时遇到问题。

当我在导入tensorflow后测试GPU的可用性时,似乎缺少.dll库(cusolver64_10.dll,通常与CUDA包一起提供)并且测试失败。

从谷歌,我看到一个解决方案是从以前版本的 CUDA 复制文件。这样做对吗?

CUDA 和 CUDA DNN 是按照 Nvidia 文档安装的,并且测试正常(关于 CUDA 文件夹中的样本)。

我的系统信息:

OS : Windows 10
Visual Studio Community 2019
Cuda toolkit : Cuda compilation tools, release 11.1, V11.1.105 (from nvcc --version)
GPU : Geforce RTX 3070, driver version : 460.79, CUDA 11.2 (from nvidia-smi)
Cuda DNN : version 8.05.39
CPU : Ryzen 9 3900 XT
Framework: Anaconda (conda 4.9.2), virtual environment created with python 3.8, installation of tensorflow from pip tf-nightly-gpu (tf-nightly-gpu==2.5.0.dev20201213).

我尝试使用pip install tensorflow-gpu,但不起作用。

我得到了什么:

(deeplearning) C:\Users\Utilisateur>python
Python 3.8.0 (default, Nov  6 2019, 16:00:02) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2020-12-14 10:13:14.134389: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
>>> print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
2020-12-14 10:13:20.542276: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
2020-12-14 10:13:20.573713: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1727] Found device 0 with properties:
pciBusID: 0000:2b:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.815GHz coreCount: 46 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-12-14 10:13:20.573798: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-12-14 10:13:20.580384: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-12-14 10:13:20.580485: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2020-12-14 10:13:20.584557: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-12-14 10:13:20.585655: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-12-14 10:13:20.586334: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found
2020-12-14 10:13:20.589176: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-12-14 10:13:20.589742: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-12-14 10:13:20.589814: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1764] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
Num GPUs Available:  0

【问题讨论】:

  • 尝试:conda create -n deeplearning tensorflow-gpu 然后conda activate deeplearning 然后尝试。它会自动为您下载正确版本的 cuda、cudnn 等。
  • 复制不一定总是有效。可能存在兼容性问题,或者在最坏的情况下您将其分解。
  • 使用较低版本的 CUDA。 11.0/10.2
  • 感谢您的回答。 @Souyama Debnath:由于 RTX 3070 具有 Ampere 架构,您认为使用较旧的 CUDA 版本是否可以考虑性能?实际上只有 CUDA 11.1 支持 RTX 30xx 卡。谢谢
  • 我在 Cuda11.1 和 cuDNN 8.0.4 旁边安装了 Cuda11.0。 TensorFlow 安装如下:pip tf-nightly-gpu numpy==1.19.3。 GPU 现在可用。再次感谢您的帮助!

标签: python tensorflow


【解决方案1】:

将 cusolver64_10.dll 重命名为 cusolver64_11.dll

【讨论】:

【解决方案2】:

来自 cmets

安装了 Cuda11.0 和 cuDNN 8.0.4。张量流是 安装如下:pip install tf-nightly-gpu numpy==1.19.3。 GPU 现在可用(转述自 EricP)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-03-26
    • 2021-02-04
    • 2021-03-11
    • 2019-09-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多