Last update: December 2nd, 2023
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 first written in December 2018, the latest CUDA version was 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 Version | Compatible Driver Version | Remark | First Release |
---|---|---|---|
CUDA 12.3 | >=525.60 | Reference: CUDA toolkit release notes | October 2023 |
CUDA 12.2 | >=525.60 | June 2023 | |
CUDA 12.1 | >=525.60 | February 2023 | |
CUDA 12.0 | >=525.60 | December 2022 | |
CUDA 11.8 | >=450.80 | October 2022 | |
CUDA 11.7 | >=450.80 | April 2022 | |
CUDA 11.6 | >=450.80 | January 2022 | |
CUDA 11.5 | >=450.80 | October 2021 | |
CUDA 11.4 | >=450.80 | June 2021 | |
CUDA 11.3 | >=450.80 | April 2021 | |
CUDA 11.2 | >=450.80 | December 2020 | |
CUDA 11.1 | >=450.80 | September 2020 | |
CUDA 11.0 | >=450.36 | March 2020 | |
CUDA 10.2 | >=440.33 | November 2019 | |
CUDA 10.1 | >=418.39 | February 2019 | |
CUDA 10.0 | >= 410.48 | September 2018 | |
CUDA 9.2 update 1 | >= 396.37 | June 2018 | |
CUDA 9.2 | >= 396.26 | May 2018 | |
CUDA 9.1 | >= 390.46 | December 2017 | |
CUDA 9.0 | >= 384.81 | September 2017 | |
CUDA 8.0 GA2 | >= 375.26 | February 2017 | |
CUDA 8.0 | >= 367.48 | September 2016 | |
CUDA 7.5 | >= 352.31 | September 2015 | |
CUDA 7.0 | >= 346.46 | March 2015 | |
CUDA 6.5 | >= 340.21 | Reference: Roguewave | August 2014 |
CUDA 6.0 | >= 331.62 | April 2014 | |
CUDA 5.5 | >= 319.37 | July 2013 | |
CUDA 5.0 | >= 304.54 | October 2012 | |
CUDA 4.2 | >= 295.41 | April 2012 | |
CUDA 4.1 | >= 285.05.33 | Reference: Stack Overflow | January 2012 |
CUDA 4.0 | >= 270.41.19 | May 2011 | |
CUDA 3.2 | >= 260.19.26 | November 2010 | |
CUDA 3.1 | >= 256.40 | June 2010 | |
CUDA 3.0 | >= 195.36.15 | March 2010 |
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 (binary) 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 | Highest Compute Capability Supported | Default Compute Capability |
---|---|---|---|
CUDA 12.3 | 6.0 | 9.0 | 6.0 |
CUDA 12.2 | 6.0 | 9.0 | 6.0 |
CUDA 12.1 | 6.0 | 9.0 | 6.0 |
CUDA 12.0 | 6.0 | 9.0 | 6.0 |
CUDA 11.8 | 6.0 | 8.9 | 6.0 |
CUDA 11.7 | 3.5 | 8.6 | 3.5 |
CUDA 11.6 | 3.5 | 8.6 | 3.5 |
CUDA 11.5 | 3.5 | 8.6 | 3.5 |
CUDA 11.4 | 3.5 | 8.6 | 3.5 |
CUDA 11.3 | 3.5 | 8.6 | 3.5 |
CUDA 11.2 | 3.5 | 8.6 | 3.5 |
CUDA 11.1 | 3.5 | 8.6 | 3.5 |
CUDA 11.0 | 3.5 | 8.0 | 3.5 |
CUDA 10.2 | 3.0 | 7.5 | 3.0 |
CUDA 10.1 | 3.0 | 7.5 | 3.0 |
CUDA 10.0 | 3.0 | 7.5 | 3.0 |
CUDA 9.2 update 1 | 3.0 | 7.2 | 3.0 |
CUDA 9.2 | 3.0 | 7.2 | 3.0 |
CUDA 9.1 | 3.0 | 7.2 | 3.0 |
CUDA 9.0 | 3.0 | 7.2 | 3.0 |
CUDA 8.0 GA2 | 2.0 | 6.x | 2.0 |
CUDA 8.0 | 2.0 | 6.x | 2.0 |
CUDA 7.5 | 2.0 | 5.x | 2.0 |
CUDA 7.0 | 2.0 | 5.x | 2.0 |
CUDA 6.5 | 1.1 | 5.x | 2.0 |
CUDA 6.0 | 1.0 | 3.5 | 1.0 |
CUDA 5.5 | 1.0 | 3.5 | 1.0 |
CUDA 5.0 | 1.0 | 3.5 | 1.0 |
CUDA 4.2 | 1.0 | 2.1 | 1.0 |
CUDA 4.1 | 1.0 | 2.1 | 1.0 |
CUDA 4.0 | 1.0 | 2.1 | 1.0 |
CUDA 3.2 | 1.0 | 2.1 | 1.0 |
CUDA 3.1 | 1.0 | 2.0 | 1.0 |
CUDA 3.0 | 1.0 | 2.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. This is mainly to start supporting forward compatibility. Imagine a scenario where a CUDA application that targets newer version of CUDA is to be installed on a GPU-powered server with old display driver. The new application can now be run through the installation of a newer version of CUDA toolkit alone without display driver upgrade.
Do note that forward compatibility is only supported for data center GPUs and NVIDIA GPU cloud. It is not supported for desktop GPUs. Desktop GPUs primarily only support backward (binary) compatibility.
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.
Thanks for sharing this post, is very helpful article.
Thanks a lot for this article, I very interested with this published
The way I read it your forward/backward compatibitity is the opposite of Nvidia/s: https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#cuda-runtime-and-driver-api-version
Thank you for your comment. The original explanation was indeed incorrect and has been corrected. An experiment was also performed to validate the the correct notion of the driver’s backward compatibility.
Thank you very much for these great, practical ideas. Like others who have commented, I need to create/revamp some portfolio examples. This article is very timely.
Thanks for the topic.
Thank you for sharing
Merci beaucoup pour ce partage ce travail
Pingback: List of NVIDIA Desktop Graphics Card Models for Building Deep Learning AI System | Amikelive | Technology Blog
I have Nvidia GTX 750 Titan, supposedly have CUDA 5.0/5.1 hardware wise, but funny thing is that CUDA is hardware wise disabled. Installed latest nVidi drivers (so where is CUDA driver andy why is disabled) We user buy overpriced nVdia hardware not to able to have CUDA hardware enabled and supported system wide wise by default ? I need it for data mining. So no performance for end user at all. So we buy performance hardware that can’t be utilized at all ! If i go and buy A4000 arround 1.600€ + this card even so expensive doesn’t support nvLink hardware wise so u cant chain /team up it, that’s the one fact. The other is i will have the same god damn problem enabling CUDA system wide just like i have now with 750 Titan. Nvidia CUDA parallel processing only on paper. I have read online that on MAC’s u have CUDA enabled and installed hardware wise by default within drivers only, no additional user intervention required, install CUDA supported software and up you go. And i can hardly wait for AMD ROCm that is open source and available by default in the system (no user intervention) only driver install to become CUDA competitive. I rather use less “hard to use and setup” variant as obtrusive CUDA non usable crap. Hell why they even put it on GPU if we cant use it (only to look god on specs) ? This is how nvidia treat their end user customers. How many of users can use CUDA on their systems but have capabel CUDA hardware ? Parallel processing on nvidia platform for end user not available. So instead of build “nvidia workstaion” i shold go and buy MAC, more user friendly options for now. Nvidia should deliver CUDA drivers, by defaulf in all official drivers release. many of us just need to use software that supports it and not “tamper” with non workable pron to error software requirements setups that exceed 40 GB + useless crap to be installed. And still doesn’t work.