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:
- Uninstall your current installation of CUDA. Note that the installation guide for CUDA is here.Read the description in the installation guide, go to this page, choose your OS, architecture, CUDA version ('10' will give you the latest version 10.2), and installer type (choose 'local' and then download a 2.6 GB installer file).Follow prompt and if any errors or warnings read them carefully.
- Detected 1 CUDA Capable device(s) Device 0: “GeForce GTX 1050 Ti” CUDA Driver Version / Runtime Version 9.1 / 8.0 CUDA Capability Major/Minor version number: 6.1 Total amount of global memory: 4096 MBytes ( bytes) ( 6) Multiprocessors, (128) CUDA Cores/MP: 768 CUDA Cores.
Select Target Platform Click on the green buttons that describe your target platform. Only supported platforms will be shown. Operating System Architecture Distribution Version Installer Type Do you want to cross-compile? Yes No Select Host Platform Click on the green buttons that describe your host platform. Only supported platforms will be shown. Operating System Architecture Distribution. Click on the green buttons that describe your target platform. Only supported platforms will be shown. By downloading and using the software, you agree to fully comply with the terms and conditions of the CUDA EULA.
CUDA Version | Compatible Driver Version | Remark |
---|---|---|
CUDA 10.1 | >=418.39 | Reference: CUDA toolkit release notes |
CUDA 10.0 | >= 410.48 | |
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.21 | Reference: 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.33 | Reference: 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 newer 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 not 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 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 not be working when it is run on a host with CUDA 8.0 and driver version 367 due to forward incompatibility 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 still make the application run properly due to backward compatibility.
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 Version | Minimum Compute Capability | Default Compute Capability |
---|---|---|
CUDA 10.0 | 3.0 | 3.0 |
CUDA 9.2 update 1 | 3.0 | 3.0 |
CUDA 9.2 | 3.0 | 3.0 |
CUDA 9.1 | 3.0 | 3.0 |
CUDA 9.0 | 3.0 | 3.0 |
CUDA 8.0 GA2 | 2.0 | 2.0 |
CUDA 8.0 | 2.0 | 2.0 |
CUDA 7.5 | 2.0 | 2.0 |
CUDA 7.0 | 2.0 | 2.0 |
CUDA 6.5 | 1.1 | 2.0 |
CUDA 6.0 | 1.0 | 1.0 |
CUDA 5.5 | 1.0 | 1.0 |
CUDA 5.0 | 1.0 | 1.0 |
CUDA 4.2 | 1.0 | 1.0 |
CUDA 4.1 | 1.0 | 1.0 |
CUDA 4.0 | 1.0 | 1.0 |
CUDA 3.2 | 1.0 | 1.0 |
CUDA 3.1 | 1.0 | 1.0 |
CUDA 3.0 | 1.0 | 1.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.
-->The Windows Insider SDK supports running existing ML tools, libraries, and popular frameworks that use NVIDIA CUDA for GPU hardware acceleration inside a WSL 2 instance. This includes PyTorch and TensorFlow as well as all the Docker and NVIDIA Container Toolkit support available in a native Linux environment.
Note
The following features are available in prerelease versions of Windows 10, and are subject to change.
Install the latest Windows Insider Dev Channel build
To use this preview, you'll need to register for the Windows Insider Program. Once you do, follow these instuctions to install the latest Insider build. When choosing your settings, ensure you're selecting the Dev Channel.
Nvidia Cuda Drivers Mac
For this preview, you need Build 20150 or higher. You can check your build version number by running winver
via the Run command (Windows logo key + R).
Install the preview GPU driver
Nvidia Cuda Drivers Windows
Download and install the NVIDIA CUDA-enabled driver for WSL to use with your existing CUDA ML workflows.
Nvidia Cuda Drivers
Set up WSL 2 for the preview
Once you've installed the above driver, ensure you enable WSL 2 and install a glibc-based distribution (such as Ubuntu or Debian). Ensure you have the latest kernel by selecting Check for updates in the Windows Update section of the Settings app.
Note
Nvidia Cuda Driver Download

Ensure you have Receive updates for other Microsoft products when you update Windows enabled. You can find it in Advanced options within the Windows Update section of the Settings app.
For this preview, you need a kernel version of 4.19.121 or higher. You can check the version number by running the following command in PowerShell.
Now you can start using your exisiting Linux workflows through NVIDIA Docker, or by installing PyTorch or TensorFlow inside WSL 2. More information on getting set up is captured in NVIDIA's CUDA on WSL User Guide.
Share feedback on NVIDIA's support via their Community forum for CUDA on WSL.
