Driver API version and toolkit version

I’m currently using toolkit version of 2.2. How to I identity the systems on which a module developed using this toolkit will work ? I use only the functions that are part of compute capability 1.2. So I check in my module using the device properties that the major and minor revision is greater than or equal to 1.2. But will my cudaGetDeviceProperty function always work ? What effect does the driver version have on the execution of this function ? Is the toolkit version my driver api version ?

Additional questions.

What is driver api version ?
What is tool kit version ?
What is CUDA DRIVER version ?
Do all NVIDIA drivers support CUDA run time calls ?
What is NVIDIA Driver version ?
How are the above related to each other in terms of compatibility ?

Regards,
Suresh Kumar.

Yes. Just be aware that when there are no CUDA capable GPUs in the system, cudaGetDevice() reports 1 for some crazy reason. cudaGetDeviceProperty will tell you that device is a compute 9999.9999 device. This is not a bug, it is a documented “feature”.

Do you only use the driver API? I’m not sure how compatibility works with that: I think your app will run with any CUDA driver as long as it has all the features you are using.

If you are using the runtime API, then you must have a driver with the same version as the runtime or newer. Check with cudaRuntimeGetVersion and cudaDriverGetVersion.

“cudaGetDeviceProperty will tell you that device is a compute 9999.9999 device.” I understand that this is due to the device emulation.

I only use the run time API. Isn’t the runtime version same as the drive api verison. I think they are. I’m assuming this because the runtime API calls in to the driver API.

Even more confusion <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=‘:’(’ />

cudaRuntimeGetVersion does it return the runtime version of the dlls I use with my module or the runtime version the system the module is running on. Similarly what does the cudaDriverGetVersion return, is it the driver version of the system that I’m running the module. If the nvidia driver does not support cuda what value does it return ?

Looks like I have some answers now after some more reading.

CUDA_VERSION in cuda.h is the driver api version I’m using. The cudaDriverGetVersion returns the version of the cuda driver that is installed on the system. If no cuda driver is found it returns 0. Now the toolkit version appears to be equivalent to drive api which appears to be equivalent to the runtime version. So I’m thinking cudaRuntimeGetVersion should return the value in the CUDA_VERSION value that is stored in the cudart.dll that I’m using.

If I understood things wrong please let me know.

Thank you.

Yep, you’ve got it.

Note that the drivers are backwards compatible. So as long as the driver version is >= to the runtime version, everything should run fine.

And the 9999.9999 does show up when you use emulation, but it also shows up on systems

  • without nvidia drivers installed

  • or with nvidia drivers, but no CUDA capable GPUs

I’ve always thought it very strange that someone at NVIDIA cannot count. A system with 0 CUDA capable GPUs returns a 1 from cudaGetDeviceCount() (as done a system with only 1). This “device emulation” device is useless: if the app continues to run and tries to call cuda* functions, it is likely to crash or return random errors.