工作笔记——解决You are using GPU version Paddle, but your CUDA device is not set properly.

一、问题

先说问题,我需要配置百度的EasyDL本地gpu通用SDK需要调用paddlepaddle-gpu。在我配置好cuda-9.2以及cudnn7的环境后,安装默认的paddlepaddle-gpu(版本2.0.0),引入paddlepaddle-gpu后,报错。

Cuda error(35), CUDA driver version is insufficient for CUDA runtime version

二、解决

如果你是出现跟我类似的问题,可以按照下面的顺序去排查。

1、确认cuda以及cudnn是安装成功

我需要的是cuda9以及cudnn7的环境。
先检查cuda,控制台输入

nvcc -V

如果一下输出,说明安装成功
在这里插入图片描述
然后检查cudnn是否安装,在控制台输入

cat /usr/local/cuda-9.2/include/cudnn.h | grep CUDNN_MAJOR -A 2

在这里插入图片描述
输出版本说明,安装正确。

2、检查cuda与NVIDIA 驱动器版本是否符合

控制台输入

nvidia-smi

在这里插入图片描述
对照下表,查看你的驱动器是否需要更新
在这里插入图片描述

3、安装正确的paddlepaddle-gpu版本

如果上述排查均没有问题,那么就是paddlepaddle-gpu版本出了问题。

(from versions: 1.2.0.post85, 1.2.0.post87, 1.2.0.post97, 1.2.1.post85, 1.2.1.post87, 
1.2.1.post97, 1.3.0.post85, 1.3.0.post87, 1.3.0.post97, 1.3.1.post85, 1.3.1.post87, 
1.3.1.post97, 1.3.2.post85, 1.3.2.post87, 1.3.2.post97, 1.4.0.post85, 1.4.0.post87, 
1.4.0.post97, 1.4.1.post85, 1.4.1.post87, 1.4.1.post97, 1.5.0.post87, 1.5.0.post97, 
1.5.0.post107, 1.5.1.post87, 1.5.1.post97, 1.5.1.post107, 1.5.2.post87, 1.5.2.post97, 
1.5.2.post107, 1.6.0rc0.post107, 1.6.0.post97, 1.6.0.post107, 1.6.1.post97, 
1.6.1.post107, 1.6.2.post97, 1.6.2.post107, 1.6.3.post97, 1.6.3.post107, 1.7.0.post97, 
1.7.0.post107, 1.7.1.post97, 1.7.1.post107, 1.7.2.post97, 1.7.2.post107, 1.8.0.post97, 
1.8.0.post107, 1.8.1.post97, 1.8.1.post107, 1.8.2.post97, 1.8.2.post107, 1.8.3.post97, 
1.8.3.post107, 1.8.4.post97, 1.8.4.post107, 1.8.5.post97, 1.8.5.post107, 2.0.0a0, 2.0.0b0, 2.0.0rc0, 2.0.0rc1, 2.0.0)

版本号后面跟着的post**数字按顺序代表了你的cuda以及cudnn的版本。
比如我的环境是cuda9cudnn7那么我应该选择以post97结尾的版本。
我按照文档安装了1.2.0post97版本,运行后还是有错误,就选择了最新的1.8.5post97
至此,问题解决。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值