user1090694
user1090694

Reputation: 639

CUDA - invalid device function, how to know [architecture, code]?

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?

Upvotes: 3

Views: 16671

Answers (1)

Michael Haidl
Michael Haidl

Reputation: 5492

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

`

Upvotes: 11

Related Questions