詳解Tensorflow不同版本要求與CUDA及CUDNN版本對應(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 問題解決方案
CUDA driver version is insufficient for CUDA runtime version 翻譯過來就是CUDA的驅(qū)動程序版本跟CUDA的運(yùn)行時版本不匹配!
1.CUDA driver version(驅(qū)動版本):就是NVIDIA GPU的驅(qū)動程序版本;
查看命令:nvidia-smi
我們看到我的GPU的驅(qū)動程序版本是:384.81
2.CUDA runtime version(運(yùn)行時版本):是在python中安裝的cudatoolkit和cudnn程序包的版本
查看命令:pip list
python安裝的cudatoolkit和cudnn程序包版本是:9.2
3.nvidia 驅(qū)動和cuda runtime 版本對應(yīng)關(guān)系
運(yùn)行時版本 驅(qū)動版本
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ū)動和運(yùn)行時的版本對應(yīng)關(guān)系來看,版本為384.81的驅(qū)動程序 對應(yīng)的 運(yùn)行時版本是9.0,也就是說我們在python中安裝cudatoolkit和cudnn程序包版本9.2是過高了。
因為系統(tǒng)中依賴GPU驅(qū)動的程序比較多,一般出現(xiàn)這種情況,我們都是更改cudatoolkit和cudnn程序包的版本。
于是,先卸載python中安裝cudatoolkit和cudnn程序包:pip uninstall cudnn ; pip uninstall cudatoolkit
然后安裝對應(yīng)版本的cudatoolkit和cudnn程序包:pip install cudatoolkit=9.0;pip install cudnn
5.為什么會出現(xiàn)這種情況呢:
一般出現(xiàn)這種情況是因為在python中安裝tensorflow的gpu版本時,pip會檢查tensorflow依賴的其他的包,如果依賴的包沒有安裝,則會先安裝最新版本的依賴包。這時候tensorflow的gpu版本依賴cudatoolkit和cudnn程序包,pip就會安裝最新版本的cudatoolkit和cudnn程序包,最終導(dǎo)致gpu驅(qū)動版本和cuda運(yùn)行時版本不匹配。
到此這篇關(guān)于詳解Tensorflow不同版本要求與CUDA及CUDNN版本對應(yīng)關(guān)系的文章就介紹到這了,更多相關(guān)Tensorflow CUDA及CUDNN版本對應(yīng)內(nèi)容請搜索腳本之家以前的文章或繼續(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全過程分析(顯卡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與matlab一些常用函數(shù)互轉(zhuǎn)問題
這篇文章主要介紹了python與matlab一些常用函數(shù)互轉(zhuǎn),包括十六進(jìn)制字節(jié)流數(shù)據(jù)的相關(guān)知識,本文通過示例代碼給大家講解的非常詳細(xì),需要的朋友可以參考下2022-12-12python使用pandas讀取json文件并進(jìn)行刷選導(dǎo)出xlsx文件的方法示例
這篇文章主要介紹了python使用pandas讀取json文件并進(jìn)行刷選導(dǎo)出xlsx文件的方法,結(jié)合實例形式分析了python調(diào)用pandas模塊針對json數(shù)據(jù)操作的相關(guān)使用技巧,需要的朋友可以參考下2023-06-06Tensorflow tf.nn.depthwise_conv2d如何實現(xiàn)深度卷積的
這篇文章主要介紹了Tensorflow tf.nn.depthwise_conv2d如何實現(xiàn)深度卷積的,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-04-04不到20行實現(xiàn)Python代碼即可制作精美證件照
這篇文章主要介紹了不到20行實現(xiàn)Python代碼即可制作精美證件照,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-04-04