详解Tensorflow不同版本要求与CUDA及CUDNN版本对应
关系
参考官⽹地址:
CPU
Version Python version Compiler Build tools
tensorflow-1.11.03.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.10.03.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.9.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.8.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.7.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.6.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.5.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.4.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.3.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.2.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.1.0 3.5MSVC 2015 update 3Cmake v3.6.3
tensorflow-1.0.0 3.5MSVC 2015 update 3Cmake v3.6.3
GPU
Version Python version Compiler Build tools cuDNN CUDA
tensorflow_gpu-1.11.03.5-3.6MSVC 2015 update 3Bazel 0.15.079
tensorflow_gpu-1.10.03.5-3.6MSVC 2015 update 3Cmake v3.6.379
tensorflow_gpu-1.9.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.379
tensorflow_gpu-1.8.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.379
tensorflow_gpu-1.7.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.379
tensorflow_gpu-1.6.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.379
tensorflow_gpu-1.5.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.379
tensorflow_gpu-1.4.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.368
tensorflow_gpu-1.3.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.368
tensorflow_gpu-1.2.0 3.5-3.6MSVC 2015 update 3Cmake v3.6.35.18
tensorflow版本选择tensorflow_gpu-1.1.0 3.5MSVC 2015 update 3Cmake v3.6.35.18
tensorflow_gpu-1.0.0 3.5MSVC 2015 update 3Cmake v3.6.35.18
Linux
Version Python version Compiler Build tools
tensorflow-1.11.02.7, 3.3-3.6GCC 4.8Bazel 0.15.0
tensorflow-1.10.02.7, 3.3-3.6GCC 4.8Bazel 0.15.0
tensorflow-1.9.0 2.7, 3.3-3.6GCC 4.8Bazel 0.11.0
tensorflow-1.8.0 2.7, 3.3-3.6GCC 4.8Bazel 0.10.0
tensorflow-1.7.0 2.7, 3.3-3.6GCC 4.8Bazel 0.10.0
tensorflow-1.6.0 2.7, 3.3-3.6GCC 4.8Bazel 0.9.0
tensorflow-1.5.0 2.7, 3.3-3.6GCC 4.8Bazel 0.8.0
tensorflow-1.4.0 2.7, 3.3-3.6GCC 4.8Bazel 0.5.4
tensorflow-1.3.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.5
tensorflow-1.2.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.5
tensorflow-1.1.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.2
tensorflow-1.0.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.2
Version Python version Compiler Build tools cuDNN CUDA
tensorflow_gpu-1.11.02.7, 3.3-3.6GCC 4.8Bazel 0.15.079
tensorflow_gpu-1.10.02.7, 3.3-3.6GCC 4.8Bazel 0.15.079
tensorflow_gpu-1.9.0 2.7, 3.3-3.6GCC 4.8Bazel 0.11.079
tensorflow_gpu-1.8.0 2.7, 3.3-3.6GCC 4.8Bazel 0.10.079
tensorflow_gpu-1.7.0 2.7, 3.3-3.6GCC 4.8Bazel 0.9.079
tensorflow_gpu-1.6.0 2.7, 3.3-3.6GCC 4.8Bazel 0.9.079
tensorflow_gpu-1.5.0 2.7, 3.3-3.6GCC 4.8Bazel 0.8.079
tensorflow_gpu-1.4.0 2.7, 3.3-3.6GCC 4.8Bazel 0.5.468
tensorflow_gpu-1.3.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.568
tensorflow_gpu-1.2.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.5 5.18
tensorflow_gpu-1.1.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.2 5.18
tensorflow_gpu-1.0.0 2.7, 3.3-3.6GCC 4.8Bazel 0.4.2 5.18
macOS
CPU
Version Python version Compiler Build tools
tensorflow-1.11.02.7, 3.3-3.6Clang from xcode Bazel 0.15.0
tensorflow-1.10.02.7, 3.3-3.6Clang from xcode Bazel 0.15.0
tensorflow-1.9.0 2.7, 3.3-3.6Clang from xcode Bazel 0.11.0
tensorflow-1.8.0 2.7, 3.3-3.6Clang from xcode Bazel 0.10.1
tensorflow-1.7.0 2.7, 3.3-3.6Clang from xcode Bazel 0.10.1
tensorflow-1.6.0 2.7, 3.3-3.6Clang from xcode Bazel 0.8.1
tensorflow-1.5.0 2.7, 3.3-3.6Clang from xcode Bazel 0.8.1
tensorflow-1.4.0 2.7, 3.3-3.6Clang from xcode Bazel 0.5.4
tensorflow-1.3.0 2.7, 3.3-3.6Clang from xcode Bazel 0.4.5
tensorflow-1.2.0 2.7, 3.3-3.6Clang from xcode Bazel 0.4.5
tensorflow-1.1.0 2.7, 3.3-3.6Clang from xcode Bazel 0.4.2
tensorflow-1.0.0 2.7, 3.3-3.6Clang from xcode Bazel 0.4.2
GPU
Version Python version Compiler Build tools cuDNN CUDA
tensorflow_gpu-1.1.02.7, 3.3-3.6Clang from xcode Bazel 0.4.25.18
tensorflow_gpu-1.0.02.7, 3.3-3.6Clang from xcode Bazel 0.4.25.18
tensorflow的CUDA driver version is insufficient for CUDA runtime version 问题解决⽅案
CUDA driver version is insufficient for CUDA runtime version 翻译过来就是CUDA的驱动程序版本跟CUDA的运⾏时版本不匹配!
1.CUDA driver version(驱动版本):就是NVIDIA GPU的驱动程序版本;
查看命令:nvidia-smi
我们看到我的GPU的驱动程序版本是:384.81
2.CUDA runtime version(运⾏时版本):是在python中安装的cudatoolkit和cudnn程序包的版本
查看命令:pip list
python安装的cudatoolkit和cudnn程序包版本是:9.2
3.nvidia 驱动和cuda runtime 版本对应关系
运⾏时版本驱动版本
CUDA 9.1
CUDA 9.0
CUDA 8.0 (GA2)
CUDA 8.0 367.4x
CUDA 7.5
CUDA 7.0
CUDA 6.5
CUDA 6.0
CUDA 5.5
CUDA 5.0
CUDA 4.2 295.41
CUDA 4.1 285.05.33
CUDA 4.0 270.41.19
CUDA 3.2 260.19.26
CUDA 3.1 256.40
CUDA 3.0 195.36.15
4.解决⽅案
从驱动和运⾏时的版本对应关系来看,版本为384.81的驱动程序对应的运⾏时版本是9.0,也就是说我们在python中安装cudatoolkit和cudnn程序包版本9.2是过⾼了。
因为系统中依赖GPU驱动的程序⽐较多,⼀般出现这种情况,我们都是更改cudatoolkit和cudnn程序包的版本。
于是,先卸载python中安装cudatoolkit和cudnn程序包:pip uninstall cudnn ; pip uninstall cudatoolkit
然后安装对应版本的cudatoolkit和cudnn程序包:pip install cudatoolkit=9.0;pip install cudnn
5.为什么会出现这种情况呢:
⼀般出现这种情况是因为在python中安装tensorflow的gpu版本时,pip会检查tensorflow依赖的其他的包,如果依赖的包没有安装,则会先安装最新版本的依赖包。这时候tensorflow的gpu版本依赖cudatoolkit和cudnn程序包,pip就会安装最新版本的cudatoolkit和cudnn程序包,最终导致gpu驱动版本和cuda运⾏时版本不匹配。
到此这篇关于详解Tensorflow不同版本要求与CUDA及CUDNN版本对应关系的⽂章就介绍到这了,更多相关Tensorflow CUDA 及CUDNN版本对应内容请搜索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论