gpt4 book ai didi

python - tensorflow-gpu 2.2 与 CUDA 10.2 一起使用,但需要 cuDNN 7.6.4,它在 NVIDIA 存档中没有 CUDA 10.2 的下载文件

转载 作者:行者123 更新时间:2023-12-04 19:31:43 25 4
gpt4 key购买 nike

错误如下,完整的日志可以在这里找到: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.
这些是我从 nvidia 文件中看到的:
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
如您所见,CUDA 10.2 没有 cuDNN,但是我需要在框架的其余部分使用 CUDA 10.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型号和内存:

GeForce 1080 Ti (2x) each 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: -
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Python 3.8.5 (default, Mar 31 2021, 02:37:07)
tensorflow-gpu 2.2 是使用 pip 安装的。
$ 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
我也看到了 here但我找不到下载文件:
enter image description here

最佳答案

已安装 cuDNN 7.6.5对于 CUDA 10.2下载后使用这些命令cudnn-10.2-linux-x64-v7.6.5.32.tgz来自英伟达官网:

$ 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*
接着:
$ export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH

关于python - tensorflow-gpu 2.2 与 CUDA 10.2 一起使用,但需要 cuDNN 7.6.4,它在 NVIDIA 存档中没有 CUDA 10.2 的下载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67931031/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com