CUDA on Tesla over Remote Desktop


Typically, CUDA programs cannot be executed over a Remote Desktop session. (For more on this problem, see here.) However, if the CUDA device is a Tesla and if it does not need to be the primary graphics device, then you are in luck! A typical setup for Tesla is to have another Quadro device handle the desktop graphics, while the Tesla device handles the computation. In such setups, CUDA programs can be executed on the Tesla device over Remote Desktop! :-)


To be able to successfully execute CUDA programs on a Tesla device, you need to use a Tesla Compute Cluster (TCC) driver and set the Tesla device to TCC mode.

1. Install TCC Driver

CUDA programs can execute on Tesla devices with the CUDA developer driver you might have downloaded off the CUDA webpage. However, the developer driver is not the same as the device specific driver. (For more on the difference, see here.) To be able to use the TCC mode of the Tesla device, the TCC driver specific to the Tesla device is needed.

To get the Tesla driver, use the NVIDIA Drivers webpage and choose the driver for your Tesla device. This is its TCC driver. Install it.

2. Switch to TCC Mode

By default, the Tesla device will be working in a Windows Display Driver Model (WDDM) mode. This is the mode used by most CUDA devices, since they might need to support desktop graphics. If the Tesla device is in the WDDM mode, then it will not be able to execute CUDA programs over Remote Desktop.

To switch the Tesla device to TCC mode, we can use the NVIDIA System Management Interface (SMI) tool. On Windows, this is provided as an executable file named nvidia-smi.exe. On my system, this was found in the C:\Program Files\NVIDIA Corporation\NVSMI directory. Open a Windows command prompt with elevated (Administrator) privileges and change to this directory. (One way to open an Administrator command prompt is described here.)

To list the available NVIDIA devices use the command:

nvidia-smi -q

To view the details of a specific device use the command:

nvidia-smi -q -i 0

The -i specifies the ID of the device. Device IDs begin from 0 upwards.

Finally, to flip the driver model of a device from WDDM to TCC mode:

nvidia-smi -dm 1 -i 0

The -dm parameter takes two values: 0 for WDDM and 1 for TCC.

Changing the driver model mode of the Tesla requires a restart of the system. After the restart, you should be able to execute CUDA programs remotely on the Tesla computer! :-)

Tried with: Tesla C2050 and Quadro 4000

3 thoughts on “CUDA on Tesla over Remote Desktop

  1. i’m trying to take my tesla c106o out of tcc mode, and i’ve read in this article and others, on how to do it, but it hasnt worked for me yet. i was wondering what is suppose to happen when i run the “nvidia-smi.exe” program? when i try to run it, a command window opens, then immediately closes before i can read what it says.

    1. Kidcrash: First, please read the above instructions carefully. You should run the command from a command prompt, not by double-clicking the exe file. Second, make sure that TCC mode is supported by your Tesla hardware.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s