- 最好的方法是官网说明:
https://tensorflow.google.cn/install/source_windows
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 |
- 驱动的版本,参考:https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
CUDA Toolkit | Linux x86_64 Driver Version | Windows x86_64 Driver Version |
---|---|---|
CUDA 10.0.130 | >= 410.48 | >= 411.31 |
CUDA 9.2 (9.2.148 Update 1) | >= 396.37 | >= 398.26 |
CUDA 9.2 (9.2.88) | >= 396.26 | >= 397.44 |
CUDA 9.1 (9.1.85) | >= 390.46 | >= 391.29 |
CUDA 9.0 (9.0.76) | >= 384.81 | >= 385.54 |
CUDA 8.0 (8.0.61 GA2) | >= 375.26 | >= 376.51 |
CUDA 8.0 (8.0.44) | >= 367.48 | >= 369.30 |
CUDA 7.5 (7.5.16) | >= 352.31 | >= 353.66 |
CUDA 7.0 (7.0.28) | >= 346.46 | >= 347.62 |
- Google一下发现是tensorflow1.5.0版本只支持cuda9.0
- I downgrade to tensorflow version 1.4.0 and keras version 2.0.8. 否则版本运行有错: https://github.com/keras-team/keras/issues/9621
cuda一般安装在 /usr/local/cuda/ 路径下,该路径下有一个version.txt文档,里面记录了cuda的版本信息 cat /usr/local/cuda/version.txt 即可查询 同理,cudnn的信息在其头文件里 cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 即可查询
- 手欠把
CUDA
升级到了9.0
,然后发现cuDNN
必须升级到7.0
才支持。于是顺手把cuDNN
升级到了7.0
。然后发现在Python中导入Tensorflow报错。一查才知道tensorflow 1.3
只支持CUDA8.0
和cuDNN6.0
.想把CUDA和cuDNN降级回去,却发现Nvidia官网6.0版本的cuDNN下载不下来了。 -
需要注意的第一点是,在配置时,vs2013=Microsoft Visual Studio 12.0,vs2015=Microsoft Visual Studio 14.0。建议CUDA9.1使用VS2015,CUDA8.0使用VS2013。本质上并没有区别,但为了区分方便而已。需要注意的第二点是,两者可以安装在一台电脑上并不冲突。作者在搜索度娘时有人回答:可以同时安装,但必须先安装低版本(CUDA8.0)再安装高版本(CUDA9.0/9.1),对此笔者并没有证实,不知道所言是否正确。但为了电脑不会出什么差错,我还是先安装了8.0,再安装了9.1.实测并不冲突,可以兼容。需要注意的第三点是,CUDA8.0对应的cuDNN版本是5.1,CUDA9.0对应的cuDNN7.0。同时,cuDNN可以同时安装在CUDA8.0和9.0中,而cuDNN7.0只能对CUDA9.0及以上适用。(深度学习配置CUDA8.0/9.0及对应版本cuDNN安装 )
- cudnn版本对应 + tf版本支持对应
NVIDIA cuDNN is a GPU-accelerated library of primitives for deep neural networks. Download cuDNN v7.1.2 (Mar 21, 2018), for CUDA 9.1 Download cuDNN v7.1.2 (Mar 21, 2018), for CUDA 9.0 Download cuDNN v7.1.2 (Mar 21, 2018), for CUDA 8.0 Download cuDNN v7.1.1 (Feb 28, 2018), for CUDA 9.1 Download cuDNN v7.1.1 (Feb 28, 2018), for CUDA 9.0 Download cuDNN v7.1.1 (Feb 28, 2018), for CUDA 8.0 Download cuDNN v7.0.5 (Dec 11, 2017), for CUDA 9.1 Download cuDNN v7.0.5 (Dec 5, 2017), for CUDA 9.0 Download cuDNN v7.0.5 (Dec 5, 2017), for CUDA 8.0 Download cuDNN v7.0.4 (Nov 13, 2017), for CUDA 9.0 Download cuDNN v7.0.4 (Nov 13, 2017), for CUDA 8.0 Download cuDNN v6.0 (April 27, 2017), for CUDA 8.0 Download cuDNN v6.0 (April 27, 2017), for CUDA 7.5 Download cuDNN v5.1 (Jan 20, 2017), for CUDA 8.0 Download cuDNN v5.1 (Jan 20, 2017), for CUDA 7.5 Download cuDNN v5 (May 27, 2016), for CUDA 8.0 Download cuDNN v5 (May 12, 2016), for CUDA 7.5 Download cuDNN v4 (Feb 10, 2016), for CUDA 7.0 and later. Download cuDNN v3 (September 8, 2015), for CUDA 7.0 and later. Download cuDNN v2 (March 17,2015), for CUDA 6.5 and later. Download cuDNN v1 (cuDNN 6.5 R1)