For Tesla GPUs, please use the TCC (Tesla Compute Cluster) driver available in CUDA 3.0 and
3.1 to enable Services and Remote Desktop under Windows.
A few people have tried to create a Windows service that uses CUDA on Windows Vista, Windows Server 2008 and Windows 7. Since the Session 0 Isolation feature in these platforms means a service runs in session 0 and does not have access to the display devices, the service has no access to CUDA.
This example shows how a service can run in session 0 and launch a provider process in session 1 with access to CUDA devices.
The example is a VS2008 project which creates a Hello World service. If you build the project and then run (as administrator) CUDAService -install then it will install the service to start automatically on the next reboot. When the system is rebooted it will detect the console connect and launch the same executable in session1. It logs to a file in C:\ (defined in the Service.h file). You can also start the service interactively, once started it restarts the provider at logon/logoff.
CUDAService -uninstall terminates and removes the service.
The attachment is available below.
CUDAService.zip (13.5 KB)