GT820M显卡使用CUDA的“no kernel image is available for execution on the device”问题解决

最近使用比较老的电脑使用CUDA,一开始安装10.1的windows版本,发现无法使用,经过网上查阅信息发现是显卡驱动不支持,电脑的NVIDIA驱动是390。

然后查询到该驱动支持9.0版本的CUDA,便卸载更换为9.0版本,在C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vx.x\extras\demo_suite目录下的测试程序运行都是正常的,但是使用vs2015新建一个cuda工程发现运行异常,出错原因如下:

no kernel image is available for execution on the device

然后我再多方查找资料,发现原来是因为cuda9.0不支持算力在3.0以下的显卡,我的显卡算力是2.1

GT820M显卡使用CUDA的“no kernel image is available for execution on the device”问题解决

GT820M显卡使用CUDA的“no kernel image is available for execution on the device”问题解决

知道原因就好办了,直接将CUDA版本更换为8.0即可

使用vs2015测试,cuda8.0在GT820M上可以正常运行

GT820M显卡使用CUDA的“no kernel image is available for execution on the device”问题解决