Bootstrap

win10+MX350+CUDA+TensorFlow 安装

本人电脑小新pro13 ,显卡MX350

(结论在最后,过程可以跳过)

之前只用过CPU跑TensorFlow,速度太慢了,MX350显卡相当于阉割GTX1050,所以想尝试下用自带的MX350显卡跑

刚开始参考过这个帖子→深度学习环境配置

但是他是跑PyTorch,我目前只涉及TensorFlow。

按照他的方法,MX350显卡安装配置是CUDA v10.2 ,cuDNN v7.6.5

但是安装完成后才发现,目前TensorFlow官方只支持CUDA v10.1  (截止到我发帖2020_12_23)

 详情可见→TensorFlow官方说明

            图1 TensorFlow 官方window配置图(截止到2020_12_23)

果然安装好后,提示出错。

后卸载CUDA v10.2,重新按照官方配置说明下载了CUDA v10.0 和 cuDNN v7.4(图1 蓝色线)

【注:重新下载安装好CUDA和配置好环境变量后,建议要重启电脑,提示找不到cudart64_100.dll。明明磁盘有文件,pycharm怎么提示找不到,这里耽误了好长时间,重启电脑居然好了,识别成功】

测试时,报错,错误提示如下:

2020-12-23 01:36:08.771583: E 
tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN
library: 7.4.2 but source was compiled with: 7.6.0.  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.
2020-12-23 01:36:08.774359: E 
tensorflow/stream_executor/cuda/cuda_dnn.cc:319]Loaded runtime CuDNN
library: 7.4.2 but source was compiled with: 7.6.0.  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.
2020-12-23 01:36:08.776432: W 
tensorflow/core/common_runtime/base_collective_executor.cc:216]
BaseCollectiveExecutor::StartAbort Unknown: Failed to get convolution algorithm.
This is probably because cuDNN failed to initialize, so try looking to see if 
a warning log message was printed above.

下图翻译

                                图2 报错代码翻译图

所以说cuDNN7.4不行,要升级到7.6。

删除cuDNN7.4的文件,重新下载7.6。完美解决问题

                                   图3  下载cuDNN v7.6.4

具体安装CUDA和cuDNN的安装过程略,可以去参考帖子→深度学习环境配置

 

但是上面帖子有一点要注意下,下载CUDA的时候,尽量不要用在线下载(本人用在线下载两次都失败),所以建议要用后面一个(图4蓝色线)

                                            图4 下载CUDA选项图

所以说MX350想要跑TensorFlow需要的配置是(目前本人可正常运行,截至本人发贴2020_12_23)

结论 :MX350 + CUDA v10.0.130 + cuDNN v7.64 + TensorFlow-gpu 2.00

之前用cpu跑一项目花了将近3小时,刚试了用GPU跑,居然只用了33分钟

 

 

 

 

 

;