Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA runtime version vs CUDA driver version - what's the difference?

Tags:

The CUDA Runtime API exposes the functions

  • cudaRuntimeGetVersion() and
  • cudaDriverGetVersion()

(see detailed description here). I was sort of expecting the first one to give me "8.0" (for CUDA 8.0) and the second one to give me the same string as what I'd get from examining nVIDIA's GPU driver kernel module, e.g.

modinfo nvidia | grep "^version:" | sed 's/^version: *//;' 

which on my system is 367.57.

Now, the first call gives me 8000 - fine, just a weird way to say 8.0 I guess; but the second API call also gives me 8000. So what do both of these mean?

The Runtime API documentation I linked to doesn't seem to explain this.

like image 526
einpoklum Avatar asked Nov 14 '16 13:11

einpoklum


People also ask

What is CUDA runtime version?

The CUDA runtime version indicates CUDA compatibility (i.e. version) with respect to the installed cudart (CUDA runtime) library. The CUDA driver version (as reported here) reports the same information with respect to the driver. This relates to the driver compatibility model in CUDA.

What is the CUDA driver?

The CUDA ® Toolkit enables developers to build NVIDIA GPU accelerated compute applications for Desktop computers, Enterprise and Data centers to Hyperscalers. It consists of the CUDA compiler toolchain including the CUDA runtime (cudart) and various CUDA libraries and tools.

What is the difference between CUDA driver and Nvidia driver?

Nvidia driver includes driver kernel module and user libraries. Cuda toolkit is an SDK contains compiler, api, libs, docs, etc...

What does the CUDA runtime version mean?

The CUDA runtime version indicates CUDA compatibility (i.e. version) with respect to the installed cudart (CUDA runtime) library. The CUDA driver version (as reported here) reports the sameinformation with respect to the driver.

What is the minimum version of the CUDA toolkit?

Each version of the CUDA Toolkit (and runtime) requires a minimum version of the NVIDIA driver. The CUDA driver (libcuda.so on Linux for example) included in the NVIDIA driver package, provides binary backward compatibility. For example, an application built against the CUDA 3.2 SDK will continue to function even on today’s driver stack.

What is the difference between CUDA and CUDA Driver API?

In contrast, the CUDA driver API requires more code, is harder to program and debug, but offers a better level of control and is language-independent since it only deals with cubin objects (see Section 4.2.5).

What is the difference between NVCC and CUDA Driver?

The C host code generated by nvcc is based on the CUDA runtime , so applications that link to this code must use the CUDA runtime API. In contrast, the CUDA driver API requires more code, is harder to program and debug, but offers a better level of control and is language-independent since it only deals with cubin objects.


1 Answers

The CUDA runtime version indicates CUDA compatibility (i.e. version) with respect to the installed cudart (CUDA runtime) library.

The CUDA driver version (as reported here) reports the same information with respect to the driver.

This relates to the driver compatibility model in CUDA. As I am sure you know, a particular CUDA toolkit version (i.e. CUDA runtime library version, nvcc compiler version, etc.) requires a particular minimum driver level for proper use of the codes compiled with that toolkit.

The CUDA driver version (as reported here) effectively reports what CUDA version(s) can be supported by the particular installed driver.

As you've already discovered, it does not report the actual numbered driver version.

like image 183
Robert Crovella Avatar answered Oct 13 '22 11:10

Robert Crovella