CUDA - 无效的设备功能,如何知道[架构,代码]? [英] CUDA - invalid device function, how to know [architecture, code]?

查看:321
本文介绍了CUDA - 无效的设备功能,如何知道[架构,代码]?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在VS社区中创建CUDA项目时运行默认生成的内核时,我收到以下错误:

  addKernel launch失败:设备功能无效
addWithCuda失败!

我搜索了如何解决它,发现必须更改项目 - >属性 - > CUDA C / C ++ - >设备 - >代码生成 [架构,代码]的默认值为 compute_20,sm_20 ),但我找不到我的显卡所需的值(GeForce 8400 GS)



网络上有任何列表[结构,代码],或者是否可以通过任何命令获取它们?

解决方案 compute_XX sm_XX 是CUDA设备的计算能力(CC)。



您可以查找此链接 http:/ /en.wikipedia.org/wiki/CUDA#Supported_GPUs 用于一个(也许不是完整的)GPU列表,并有相应的CC。



您的相当老的8400 GS(当我记得正确)主持支持CC 1.1的G86芯片。



因此您必须更改为 compute_11,sm_11



`


I am getting the following error when running the default generated kernel when creating a CUDA project in VS Community:

addKernel launch failed: invalid device function
addWithCuda failed!

I searched for how to solve it, and found out that have to change the Project->Properties->CUDA C/C++->Device->Code Generation(default values for [architecture, code] are compute_20,sm_20), but I couldn't find the values needed for my graphic card (GeForce 8400 GS)

Is there any list on the net for the [architecture, code] or is it possible to get them by any command?

解决方案

The numeric value in compute_XX and sm_XX are the Compute Capability (CC) for your CUDA device.

You can lookup this link http://en.wikipedia.org/wiki/CUDA#Supported_GPUs for a (maybe not complete) list of GPUs and there corresponding CC.

Your quite old 8400 GS (when I remember correctly) hosts a G86 chip which supports CC 1.1.

So you have to change to compute_11,sm_11

`

这篇关于CUDA - 无效的设备功能,如何知道[架构,代码]?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆