Wanted to start using CUDA, getting "no CUDA-capable device is detected" error

I wanted to start out with GPU programming, since I’m currently working on a project that could massively benefit from parallel computing.
Thus, I downloaded the CUDA-toolkit, installed it etc.
My IDE is Visual Studio 2015, I’m running on Windows 10 and my Graphics Card is a GTX 960, which I checked should definitely support CUDA.
Now when I try to run either of the samples etc., nothing happens.
I started a new CUDA 8.0 template project
(which should add some vectors, but in my case returns -1 and the error message:
“cudaSetDevice failed! Do you have a CUDA-capable GPU installed?”)
and added the following code:

int devices = 0;
cudaError_t error = cudaGetDeviceCount(&devices);
if (error == cudaSuccess)
	printf("amount of devices: %d: ", devices);
	printf("getcudadevicecount failes: ");

The result of this is: “no CUDA-capable device is detected”
Obviously, I have a CUDA-capable GPU in my system, so I have no idea what could be going wrong here.
The graphics card is shown in the windows device-manager.

I tried a few restarts of my pc, updating graphics drivers and some other stuff, but this still happens.
Googling this problem didn’t give me any useful results, thus I’m posting this question in this forum.

Any help would be greatly appreciated.

The only thing I can think of is if you are using a different or on-board graphics card to output to your display, make sure that its drivers are installed. You don’t specify what motherboard/on-board video solution your computer has, but it’s most likely either AMD or Intel-based. If you can give more details to your hardware, possibly better suggestions can be given.

My motherboard is a MSI Z87-G45 Gaming motherboard.
Processor: Intel Xeon 1241v3
2x8GB Ram
Graphics Card as already stated is a GTX 960
I am pretty sure this motherboard does not have an onboard graphics device - It is not mentioned in the specification that it would have one.
I’m not sure what other hardware details could be relevant.
My displays are definitely plugged into the graphics card, whichs drivers I just made sure to have installed and updated.

That motherboard certainly appears to have on-board video:


Back Panel I/O Ports
- 1 x VGA port, supporting a maximum resolution of 1920x1200 @60Hz, 24bpp
- 1 x DVI-D port, supporting a maximum resolution of 1920x1200 @60Hz, 24bpp
- 1 x HDMI port, supporting a maximum resolution of 4096x2160 @24Hz, 24bpp/ 2560x1600@60Hz, 24bpp/ 1920x1080@60Hz, 36bpp

If your monitors are plugged into any of those motherboard ports, it may be an issue.

Hm, I didn’t think it having ports for displays means it has a chip which would do video calculations, to my knowledge it just means that if I were to plug any display into there, that the calculations would super inefficiently be made by my main processor.
If it had an integrated unit for those calculations, there would be some specifications in terms of calculation ability or its name like “nVidia Nforce xy”
What is stated here are merely throughputs of data by those ports (or so it seems to me)
correct me if I’m wrong -
either way, stuff is connected to my Graphics Card and cudaGetDeviceCount() should iterate over all graphics devices in my computer - onboard or not, thus at least finding my GTX960.

What I’m suspecting is that part of the install must’ve gone wrong somewhere, however reinstalling the CUDA toolkit doesn’t fix the problem.

Modern intel processors for these types of motherboards contain an integrated graphics processor. To some extent, the specification then depend on the exact CPU you plug into the motherboad, which is why you don’t see a set of detailed graphics specs in the motherboard spec. These connectors are essentially ports coming direction from the CPU graphics output, delivering Intel IRIS graphics.

The xeon processor you indicate however has no graphics capability.

What driver version is installed on your 960 GPU?

The GeForce Game Ready Driver is version 382.33 I am however not 100% sure this is the driver we’re talking about - the driver version mentioned in the device-manager for the 960 is

Also thanks for clearing up the thing with the on-board GPU, I got really confused for a bit there.

I however just noticed an interesting thing that the NVIDIA Control Panel is crashing when I try to open it! This is I believe where we might get to the root of the issue.

The driver version looks correct (the last numbers match – 22.21.1 3.8233). That being said, a crashing control panel is definitely not a good sign, so seems like some driver issue is present or conflicting with another software package.

You can try using DDU to remove all traces of video drivers:

and reinstall the driver afterwards to see if that fixes the issue.

Before I do that - won’t removing display drivers leave me with black screens so I can’t do anything anymore? :|
May sound like a really stupid question, but I better ask before that somehow actually happens.

So, I did use the tool, reinstalled the thing and while now the Control Panel isn’t crashing anymore when trying to open it, I still can’t run any of the samples due to non-detection of a cuda-capable device.

I saw in a google-search, that someone had the same problem and in the end was able to fix it by installing the whole freaking operating system.
Reinstalling the system is really something I’d like to avoid having to do at all costs.