Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

cuda

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?

like image 654
user1090694 Avatar asked Jul 25 '26 14:07

user1090694


1 Answers

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

`

like image 60
Michael Haidl Avatar answered Jul 28 '26 05:07

Michael Haidl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!