Running CUDA via SSH using Cywgin on Windows 7

Hi there,

Having discovered the issue with using remote desktop to run CUDA, I though I could get around it by logging into the machine with the target GPU (let’s call is GPUServer) using SSH to a daemon run by Cygwin. I managed to get the environment variables set up in bash for cl.exe and that all runs fine. But, when I run the built executable, I get the following error:

CUDA Error: no CUDA-capable device is available (at initialisations)

What is interesting is that it can find the card OK and recognise that it is capable of running CUDA, but it looks like the card is already locked.

I am logging in as the same user as GPUServer is currently logged in as locally. It is also interesting (to me at least) that if I ssh to GPUServer from GPUServer itself, I get the same error message.

I obviously am missing something in the way that Cygwin/SSH works.

If anyone can help me avoid having to resort to VNC, then that would be much appreciated.


Is it running as a service? Those have exactly the same problem as Remote Desktop.

Yes it was. I have removed the service and it runs fine now. I guess I will just have to run sshd in a batch file on local login on the target server.

I have since read the Microsoft document on Session 0 linked to from the sticky on running CUDA as a service, which I think explains the issue.

Thanks for your help.


Hi Randompunteruk,

Can you please share the way to “run sshd in a batch file on local login on the target server”? It will save me a lot of headache.

Thanks a lot,