简体   繁体   English

tensorflow-gpu 2.2 适用于 CUDA 10.2 但需要 cuDNN 7.6.4,它在 NVIDIA 存档中没有 CUDA 10.2 的下载文件

[英]tensorflow-gpu 2.2 works with CUDA 10.2 but requires cuDNN 7.6.4 which doesn't have a download file in NVIDIA archive for CUDA 10.2

The error is as follows and full log can be found here: https://pastebin.com/raw/0WQw8ktB错误如下,完整的日志可以在这里找到: https://pastebin.com/raw/0WQw8ktB

2021-06-10 22:03:04.201770: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10 2021-06-10 22:03:04.420481: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2021-06-10 22:03:05.034154: E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN library: 7.4.2 but source was compiled with:
7.6.4.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration. 2021-06-10 22:03:05.038684: E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN library: 7.4.2 but source was compiled with: 7.6.4.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.

These are what I see from nvidia archive:这些是我从 nvidia 档案中看到的:

https://developer.nvidia.com/rdp/cudnn-archive https://developer.nvidia.com/rdp/cudnn-archive

Download cuDNN v7.6.4 (September 27, 2019), for CUDA 10.1
Download cuDNN v7.6.4 (September 27, 2019), for CUDA 10.0
Download cuDNN v7.6.4 (September 27, 2019), for CUDA 9.2
Download cuDNN v7.6.4 (September 27, 2019), for CUDA 9.0

As you see there is no cuDNN for CUDA 10.2 however, I need to use CUDA 10.2 for the rest of my framework.如您所见,CUDA 10.2 没有 cuDNN,但是,我需要为我的框架的 rest 使用 CUDA 10.2。 tensorflow-gpu 2.2 works with CUDA 10.2 but I get this error which implies I need to use cuDNN 7.6.4 instead of 7.4.2 tensorflow-gpu 2.2 适用于 CUDA 10.2 但我收到此错误,这意味着我需要使用 cuDNN 7.6.4 而不是 7.4.2

python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
v2.2.0-rc4-8-g2b96f3662b 2.2.0

GPU model and memory: GPU model 和 memory:

GeForce 1080 Ti (2x) each 12GB memory GeForce 1080 Ti (2x) 每个 12GB memory

$ stat /usr/local/cuda
  File: ‘/usr/local/cuda’ -> ‘/usr/local/cuda-10.2’
  Size: 20          Blocks: 0          IO Block: 4096   symbolic link
Device: fd00h/64768d    Inode: 67157410    Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:usr_t:s0
Access: 2021-06-10 22:12:20.673080083 -0400
Modify: 2020-09-21 09:39:18.559883390 -0400
Change: 2020-09-21 09:39:18.559883390 -0400
 Birth: -

and

[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux

and

Python 3.8.5 (default, Mar 31 2021, 02:37:07)

tensorflow-gpu 2.2 was installed using pip. tensorflow-gpu 2.2 是使用 pip 安装的。 and

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:    7.9.2009
Codename:   Core

I also see this here but I can't find the download file:我也在这里看到了这个,但我找不到下载文件: 在此处输入图像描述

Installed cuDNN 7.6.5 for CUDA 10.2 using these commands after downloading cudnn-10.2-linux-x64-v7.6.5.32.tgz from NVIDIA official Website:从 NVIDIA 官方网站下载cudnn-10.2-linux-x64-v7.6.5.32.tgz后,使用这些命令为CUDA 10.2安装cuDNN 7.6.5

$ sudo cp cuda/include/cudnn*.h /usr/local/cuda/include 

$ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64 

$ sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

and then:接着:

$ export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH

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

相关问题 Tensorflow-GPU 不使用 GPU 和 CUDA,CUDNN - Tensorflow-GPU not using GPU with CUDA,CUDNN cuDNN 启动失败(tensorflow-gpu/CUDA) - cuDNN launch failure (tensorflow-gpu/CUDA) tensorflow-gpu 2.3 安装了 cuda 并且 cudnn 无法检测到 GPU? - tensorflow-gpu 2.3 install with cuda and cudnn can't detect GPU? 是否可以将 CUDA 10.2 与 tensorflow 2.1 一起使用? - Is it possible to use CUDA 10.2 with tensorflow 2.1? 如何使用NVIDIA驱动程序/ CUDA(支持tensorflow-gpu)和带pip的Python3为图像制作Dockerfile? - How to craft a Dockerfile for an image with NVIDIA driver/CUDA (support for tensorflow-gpu) and Python3 with pip? Anaconda 中的 Tensorflow-Gpu 和 Cuda 驱动程序存在问题 - Problem with Tensorflow-Gpu and Cuda drivers in Anaconda TF 2.0 GPU配置,如何在pycharm中创建另一个虚拟环境后配置tensorflow-gpu 2.0和cuda,cudnn - TF 2.0 GPU cofingure, how to configure the tensorflow-gpu 2.0 and cuda, cudnn after create another virtual environment in pycharm PyTorch CUDA 版本始终为10.2 - PyTorch CUDA version is always 10.2 我没有Nvidia GPU,想在CPU上运行Tensorflow模型。 为什么它总是要求一些CUDA DLL? - I don't have an Nvidia GPU and want to run a Tensorflow model on the CPU. Why does it keep asking for some CUDA DLL? 使用Cuda 10安装pip tensorflow-gpu后出现错误 - Error after installing pip tensorflow-gpu with cuda 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM