詳解Tensorflow不同版本要求與CUDA及CUDNN版本對(duì)應(yīng)關(guān)系
參考官網(wǎng)地址:
Windows端:https://tensorflow.google.cn/install/source_windows
CPU
| Version | Python version | Compiler | Build tools |
|---|---|---|---|
| tensorflow-1.11.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.10.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.9.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.8.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.7.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.6.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.5.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.4.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.3.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.2.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.1.0 | 3.5 | MSVC 2015 update 3 | Cmake v3.6.3 |
| tensorflow-1.0.0 | 3.5 | MSVC 2015 update 3 | Cmake v3.6.3 |
GPU
| Version | Python version | Compiler | Build tools | cuDNN | CUDA |
|---|---|---|---|---|---|
| tensorflow_gpu-1.11.0 | 3.5-3.6 | MSVC 2015 update 3 | Bazel 0.15.0 | 7 | 9 |
| tensorflow_gpu-1.10.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
| tensorflow_gpu-1.9.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
| tensorflow_gpu-1.8.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
| tensorflow_gpu-1.7.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
| tensorflow_gpu-1.6.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
| tensorflow_gpu-1.5.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
| tensorflow_gpu-1.4.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 6 | 8 |
| tensorflow_gpu-1.3.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 6 | 8 |
| tensorflow_gpu-1.2.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 5.1 | 8 |
| tensorflow_gpu-1.1.0 | 3.5 | MSVC 2015 update 3 | Cmake v3.6.3 | 5.1 | 8 |
| tensorflow_gpu-1.0.0 | 3.5 | MSVC 2015 update 3 | Cmake v3.6.3 | 5.1 | 8 |
Linux端:https://tensorflow.google.cn/install/source
Linux
| Version | Python version | Compiler | Build tools |
|---|---|---|---|
| tensorflow-1.11.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.15.0 |
| tensorflow-1.10.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.15.0 |
| tensorflow-1.9.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.11.0 |
| tensorflow-1.8.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.10.0 |
| tensorflow-1.7.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.10.0 |
| tensorflow-1.6.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.9.0 |
| tensorflow-1.5.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.8.0 |
| tensorflow-1.4.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.5.4 |
| tensorflow-1.3.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.5 |
| tensorflow-1.2.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.5 |
| tensorflow-1.1.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.2 |
| tensorflow-1.0.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.2 |
| Version | Python version | Compiler | Build tools | cuDNN | CUDA |
|---|---|---|---|---|---|
| tensorflow_gpu-1.11.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.15.0 | 7 | 9 |
| tensorflow_gpu-1.10.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.15.0 | 7 | 9 |
| tensorflow_gpu-1.9.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.11.0 | 7 | 9 |
| tensorflow_gpu-1.8.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.10.0 | 7 | 9 |
| tensorflow_gpu-1.7.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.9.0 | 7 | 9 |
| tensorflow_gpu-1.6.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.9.0 | 7 | 9 |
| tensorflow_gpu-1.5.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.8.0 | 7 | 9 |
| tensorflow_gpu-1.4.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.5.4 | 6 | 8 |
| tensorflow_gpu-1.3.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.5 | 6 | 8 |
| tensorflow_gpu-1.2.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.5 | 5.1 | 8 |
| tensorflow_gpu-1.1.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.2 | 5.1 | 8 |
| tensorflow_gpu-1.0.0 | 2.7, 3.3-3.6 | GCC 4.8 | Bazel 0.4.2 | 5.1 | 8 |
macOS
CPU
| Version | Python version | Compiler | Build tools |
|---|---|---|---|
| tensorflow-1.11.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.15.0 |
| tensorflow-1.10.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.15.0 |
| tensorflow-1.9.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.11.0 |
| tensorflow-1.8.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.10.1 |
| tensorflow-1.7.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.10.1 |
| tensorflow-1.6.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.8.1 |
| tensorflow-1.5.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.8.1 |
| tensorflow-1.4.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.5.4 |
| tensorflow-1.3.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.4.5 |
| tensorflow-1.2.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.4.5 |
| tensorflow-1.1.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.4.2 |
| tensorflow-1.0.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.4.2 |
GPU
| Version | Python version | Compiler | Build tools | cuDNN | CUDA |
|---|---|---|---|---|---|
| tensorflow_gpu-1.1.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.4.2 | 5.1 | 8 |
| tensorflow_gpu-1.0.0 | 2.7, 3.3-3.6 | Clang from xcode | Bazel 0.4.2 | 5.1 | 8 |
tensorflow的CUDA driver version is insufficient for CUDA runtime version 問(wèn)題解決方案
CUDA driver version is insufficient for CUDA runtime version 翻譯過(guò)來(lái)就是CUDA的驅(qū)動(dòng)程序版本跟CUDA的運(yùn)行時(shí)版本不匹配!
1.CUDA driver version(驅(qū)動(dòng)版本):就是NVIDIA GPU的驅(qū)動(dòng)程序版本;
查看命令:nvidia-smi

我們看到我的GPU的驅(qū)動(dòng)程序版本是:384.81
2.CUDA runtime version(運(yùn)行時(shí)版本):是在python中安裝的cudatoolkit和cudnn程序包的版本
查看命令:pip list

python安裝的cudatoolkit和cudnn程序包版本是:9.2
3.nvidia 驅(qū)動(dòng)和cuda runtime 版本對(duì)應(yīng)關(guān)系
運(yùn)行時(shí)版本 驅(qū)動(dòng)版本
CUDA 9.1 387.xx
CUDA 9.0 384.xx
CUDA 8.0 375.xx (GA2)
CUDA 8.0 367.4x
CUDA 7.5 352.xx
CUDA 7.0 346.xx
CUDA 6.5 340.xx
CUDA 6.0 331.xx
CUDA 5.5 319.xx
CUDA 5.0 304.xx
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.解決方案
從驅(qū)動(dòng)和運(yùn)行時(shí)的版本對(duì)應(yīng)關(guān)系來(lái)看,版本為384.81的驅(qū)動(dòng)程序 對(duì)應(yīng)的 運(yùn)行時(shí)版本是9.0,也就是說(shuō)我們?cè)趐ython中安裝cudatoolkit和cudnn程序包版本9.2是過(guò)高了。
因?yàn)橄到y(tǒng)中依賴(lài)GPU驅(qū)動(dòng)的程序比較多,一般出現(xiàn)這種情況,我們都是更改cudatoolkit和cudnn程序包的版本。
于是,先卸載python中安裝cudatoolkit和cudnn程序包:pip uninstall cudnn ; pip uninstall cudatoolkit
然后安裝對(duì)應(yīng)版本的cudatoolkit和cudnn程序包:pip install cudatoolkit=9.0;pip install cudnn
5.為什么會(huì)出現(xiàn)這種情況呢:
一般出現(xiàn)這種情況是因?yàn)樵趐ython中安裝tensorflow的gpu版本時(shí),pip會(huì)檢查tensorflow依賴(lài)的其他的包,如果依賴(lài)的包沒(méi)有安裝,則會(huì)先安裝最新版本的依賴(lài)包。這時(shí)候tensorflow的gpu版本依賴(lài)cudatoolkit和cudnn程序包,pip就會(huì)安裝最新版本的cudatoolkit和cudnn程序包,最終導(dǎo)致gpu驅(qū)動(dòng)版本和cuda運(yùn)行時(shí)版本不匹配。
到此這篇關(guān)于詳解Tensorflow不同版本要求與CUDA及CUDNN版本對(duì)應(yīng)關(guān)系的文章就介紹到這了,更多相關(guān)Tensorflow CUDA及CUDNN版本對(duì)應(yīng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- Win10下安裝CUDA11.0+CUDNN8.0+tensorflow-gpu2.4.1+pytorch1.7.0+paddlepaddle-gpu2.0.0
- TensorFlow的環(huán)境配置與安裝教程詳解(win10+GeForce GTX1060+CUDA 9.0+cuDNN7.3+tensorflow-gpu 1.12.0+python3.5.5)
- Visual Studio 2019下配置 CUDA 10.1 + TensorFlow-GPU 1.14.0
- Win10下安裝并使用tensorflow-gpu1.8.0+python3.6全過(guò)程分析(顯卡MX250+CUDA9.0+cudnn)
- tensorflow -gpu安裝方法(不用自己裝cuda,cdnn)
- Win10 GPU運(yùn)算環(huán)境搭建(CUDA10.0+Cudnn 7.6.5+pytroch1.2+tensorflow1.14.0)
相關(guān)文章
Python中json.dumps()和json.dump()的區(qū)別小結(jié)
在Python中,json.dumps()和json.dump()是兩個(gè)常用的函數(shù),本文主要介紹了Python中json.dumps()和json.dump()的區(qū)別小結(jié),具有一定的參考價(jià)值,感興趣的可以了解一下2024-02-02
查看keras的默認(rèn)backend實(shí)現(xiàn)方式
這篇文章主要介紹了查看keras的默認(rèn)backend實(shí)現(xiàn)方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2020-06-06
Python如何讀取MySQL數(shù)據(jù)庫(kù)表數(shù)據(jù)
這篇文章主要為大家詳細(xì)介紹了Python如何讀取MySQL數(shù)據(jù)庫(kù)表數(shù)據(jù),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-03-03
python如何利用paramiko執(zhí)行服務(wù)器命令
這篇文章主要介紹了python如何利用paramiko執(zhí)行服務(wù)器命令,幫助大家更好的理解和使用python,感興趣的朋友可以了解下2020-11-11
TensorFlow和Numpy矩陣操作中axis理解及axis=-1的解釋
在調(diào)用numpy庫(kù)中的concatenate()時(shí),有遇到axis=-1/1/0的情況,下面這篇文章主要給大家介紹了關(guān)于TensorFlow和Numpy矩陣操作中axis理解及axis=-1解釋的相關(guān)資料,文中通過(guò)實(shí)例代碼介紹的非常詳細(xì),需要的朋友可以參考下2022-03-03

