CUDA Compatibility of NVIDIA Display / GPU Drivers

The last post about CUDA installation guide was for CUDA 9.2. We went through several types of CUDA installation methods, including the multiple-version CUDA installs. While the guide is still valid for CUDA 9.2, NVIDIA keeps releasing newer versions of CUDA. As a concrete example, when this article was written, the latest CUDA version has been CUDA 10, taking the spotlight from CUDA 9.2. If we are about to upgrade to CUDA 10, how can we achieve so? Can we simply upgrade the CUDA toolkit without upgrading the display driver?

Handling CUDA Version Upgrade

CUDA version upgrade itself can be a misleading term because since CUDA 8.0, multiple versions of CUDA can be installed on the same machine. But let’s have a simple scenario where we already have CUDA 9.1 installed and only want to upgrade to CUDA 10. NVIDIA states that each version of CUDA toolkit requires certain minimum NVIDIA display version that should be satisfied. This means that when upgrading to newer version of CUDA toolkit, we need to make sure that the currently installed display driver version is newer/bigger than the minimum compatible display driver version. In other words, standard CUDA upgrade involves two upgrade processes: CUDA (toolkit) upgrade and driver upgrade. The following picture visualizes the standard upgrade process from CUDA 9.1 to CUDA 10: the toolkit is upgraded from 9.1 to 10 and the driver is upgraded from 390 to 410.


How about upgrade scenario for other CUDA versions? NVIDIA maintains the compatibility table for CUDA and NVIDIA display driver version in its CUDA release note page. For Linux, the compatibility table can be seen below:

CUDA VersionCompatible Driver VersionRemark
CUDA 10.0>= 410.48Reference: CUDA toolkit release notes
CUDA 9.2 update 1>= 396.37
CUDA 9.2>= 396.26
CUDA 9.1>= 390.46
CUDA 9.0>= 384.81
CUDA 8.0 GA2>= 375.26
CUDA 8.0>= 367.48
CUDA 7.5>= 352.31
CUDA 7.0>= 346.46
CUDA 6.5>= 340.21Reference: Roguewave
CUDA 6.0>= 331.62
CUDA 5.5>= 319.37
CUDA 5.0>= 304.54
CUDA 4.2>= 295.41
CUDA 4.1>= 285.05.33Reference: Stack Overflow
CUDA 4.0>= 270.41.19
CUDA 3.2>= 260.19.26
CUDA 3.1>= 256.40
CUDA 3.0>= 195.36.15

As can be seen in the table, upgrading to CUDA 10 from CUDA 9.1 requires NVIDIA display driver with version at least 410.48. To check the current display driver version installed in the system, we can use nvidia-smi command as follows:

$ nvidia-smi | grep "Driver Version" | awk '{print $6}'

If the version is older than 410.48, obviously we need to update the driver. The instruction on how to update the display driver can be seen in this article.

One thing to note when upgrading CUDA is whether we currently have CUDA application or library compiled with older CUDA driver version. CUDA driver upgrade is backward compatible only and not forward compatible. This means that the application or library that is compiled with API from the newer CUDA driver version will be working properly in an environment where older CUDA driver version is installed. However, an application compiled with API from the older driver version will not work properly when a newer CUDA driver is installed in that environment. CUDA driver backward compatibility is explained visually in the following illustration.

As seen in the picture, a CUDA application compiled with CUDA 9.1 and CUDA driver version 390 will be working when it is run on a host with CUDA 8.0 and driver version 367 due to backward compatibility nature of the driver. Doing it the other way, which is running the application compiled with CUDA 8.0 and driver version 367 on the host with CUDA 9.1 and driver version 390 will result in error.

CUDA Version dan Minimum Compute Capability

Each version of CUDA is shipped with minimum compute capability it can support. When upgrading CUDA especially on a machine with older GPU, it is necessary to confirm if the CUDA version supports the compute capability of the GPU device. The minimum compute capability for various CUDA versions can be seen in the following table:

CUDA VersionMinimum Compute CapabilityDefault Compute Capability
CUDA 10.03.03.0
CUDA 9.2 update 13.03.0
CUDA 9.23.03.0
CUDA 9.13.03.0
CUDA 9.03.03.0
CUDA 8.0 GA22.02.0
CUDA 8.02.02.0
CUDA 7.52.02.0
CUDA 7.02.02.0
CUDA 6.51.12.0
CUDA 6.01.01.0
CUDA 5.51.01.0
CUDA 5.01.01.0
CUDA 4.21.01.0
CUDA 4.11.01.0
CUDA 4.01.01.0
CUDA 3.21.01.0
CUDA 3.11.01.0
CUDA 3.01.01.0

A concrete example: Suppose that you have GeForce GTX 560 Ti GPU on a machine and plan to install CUDA 10. This will fail since GeForce GTX 560 Ti has compute capability 2.0 while the minimum compute capability that can be supported by CUDA 10 is 3.0. The latest CUDA version that can be installed to work with the GTX 560 Ti is CUDA 8.0.

To find the compute capability of your GPU / graphics card model, you can refer to the CUDA-enabled GPU list maintained by NVIDIA. Alternatively, if you’re using GPU(s) in a desktop and specifically use CUDA for deep learning, you can find the compute capability of your graphics card model in this page. For deep learning purpose, the GPU needs to have compute capability at least 3.0. So, even if your GPU is CUDA-enabled, you need to double check if the architecture supports deep learning features.

Footnote

Since CUDA 10, it’s possible to upgrade the toolkit and runtime without upgrading the driver. However, this is only applicable to enterprise users. Refer to the illustration below on the upgrade mechanism for CUDA 10. As you can see, the CUDA driver is put into compatibility package that is shipped along with the toolkit and runtime distribution.

If you’re using CUDA on a production server and would like to have more flexibility in upgrading CUDA, you may consider upgrading to CUDA 10. However, non-enterprise users shall proceed with the standard upgrade process where both the driver and the toolkit should be upgraded.

2 thoughts on “CUDA Compatibility of NVIDIA Display / GPU Drivers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.