Nothing with CUDA works on this 1 device

Hi, I’m truly lost on this one! I would greatly appreciate any help:

I’m getting very weird errors when trying to run a CUDA solution on VS 2022 Windows 11 Cuda 12 toolkit on a laptop with GTX 960M (it has compute capability 5.0, which should be fine with CUDA 12, and I made sure to update all drivers.)

When trying to run anything from official cuda samples I get “The command “…nvcc.exe”… exited with code -1.”

And when I try to run my own solution, that works perfectly fine on 2 other computers, the c++ code works, but after running a kernel I get “no kernel image is available for execution on the device in cudaGetLastError()”

I couldn’t find anything online on either of the errors

CUDA 12 (and CUDA 11) compile for a cc5.2 target by default.

That won’t work on a cc5.0 GPU.

See here.

1 Like

Regarding this:

There is not enough information to sort that one out. The error you are getting is a MSB3721 error, and it’s merely saying “compilation failed”. To find out why it failed, you need to increase verbosity on VS (google for that). You need to get to the point (by increasing verbosity) where you actually see the nvcc command being issued in the console, and the actual message that nvcc returned. There may be many reasons for this, here is one possibility. I’m not saying that is what your issue is, its just an example.

1 Like

Thank you, adding compute_50,sm_50 to code generation fixed my solution, and increasing verbosity on cuda samples gave me a very basic VS error that I fixed

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.