Compatibility Assessment
Compatibility Testing
The CUDA development environment relies on tight integration with the host development environment, including the host compiler and C runtime libraries, and is therefore only supported on Ubuntu versions that have been qualified for the CUDA Toolkit release.
The material below provides instructions on how to ensure the NVIDIA Drivers are going to be compatible with the host system.
Compatibility between CUDA 12.3 and the host development environment
This table lists the kernel versions, default GCC (GNU Compiler Collection) versions, and GLIBC (GNU C Library) versions for two different LTS (Long-Term Support) releases of Ubuntu.
Ubuntu 22.04 LTS
5.15-43
11.2
2.35
Check the Kernel compatibility
To check the kernel version of your Ubuntu 22.04 system, you can use the uname
command in the terminal.
The uname
command with different options provides various system information, including the kernel version. Here's how you can do it:
Run the uname
command to get the kernel version by typing the following command and press Enter:
uname -r
Output on a typical Ubuntu 22.04 virtual machine
5.15.0-105-generic
As you can see here the first Linux kernel is 5.15 - which is compatible with the CUDA Toolkit installed (range of 5.13.0 to 5.13.46).
Check GNU Compiler Compatibility
NVIDIA CUDA Libraries work in conjunction with GCC (GNU Compiler Collection) on Linux systems.
GCC is commonly used for compiling the host (CPU) part of the code, while CUDA tools like nvcc (NVIDIA CUDA Compiler) are used for compiling the device (GPU) part of the code.
gcc --version
The output should show you have GCC installed:
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This version 11.4 should work with CUDA 12.3, which requires at least 11.2.
GCC is considered 'backward compatible', so this version of 11.4 should be fine.
Check GLIBC Compatibility
The GNU C Library, commonly known as glibc, is an important component of GNU systems and Linux distributions.
GLIBC is the GNU Project's implementation of the C standard library. It provides the system's core libraries. This includes facilities for basic file I/O, string manipulation, mathematical functions, and various other standard utilities.
To check the GLIBC version:
ldd --version
The first line of the output will show the version number. For example:
ldd (Ubuntu GLIBC 2.35-0ubuntu3.7) 2.35
Compare this with the GLIBC version in your table.
The GLIBC version of 2.35 is the same as the version required for the NVIDIA CUDA Toolkit
With the NVIDIA CUDA Toolkit's compatibility with host installations, the next step is to do a check for compatibility
Process for checking installations have been successful
First, check your Ubuntu version. Ensure it matches Ubuntu 22.04, which is our designated Linux operating system
lsb_release -a
Then, verify that your system is based on the x86_64 architecture. Run:
uname -m
The output should be:
x86_64
To check if your system has a CUDA-capable NVIDIA GPU, run
nvidia-smi
You should see an output like this, which details the NVIDIA Drivers installed and the CUDA Version.
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02 Driver Version: 530.30.02 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 On | 00000000:00:05.0 Off | 0 |
| N/A 36C P0 56W / 400W| 4MiB / 81920MiB | 0% Default |
| | | Disabled |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1314 G /usr/lib/xorg/Xorg 4MiB |
+---------------------------------------------------------------------------------------+
A full analysis
To do this all at once...
If you would like a full printout of your system features, enter this command into the terminal:
echo "Machine Architecture: $(uname -m)" && \
echo "Kernel Name: $(uname -s)" && \
echo "Kernel Release: $(uname -r)" && \
echo "Kernel Version: $(uname -v)" && \
echo "Hostname: $(uname -n)" && \
echo "Operating System: $(uname -o)" && \
echo "----" && \
cat /proc/version && \
echo "----" && \
echo "CPU Information:" && cat /proc/cpuinfo | grep 'model name' | uniq && \
echo "----" && \
echo "Memory Information:" && cat /proc/meminfo | grep 'MemTotal' && \
echo "----" && \
lsb_release -a 2>/dev/null && \
echo "----" && \
echo "NVCC Version:" && nvcc --version
The output from the terminal will provide you all the information necessary to check system information for compatibility.
Installation of .NET SDK - required for Polyglot Notebooks
Test Compatibility
Below are some scripts to create to test for compatibility.
These scripts will test that both your CPU and GPU are correctly processing the CUDA code. It will also test to make sure there are no compatibility issues between the installed GCC version and the CUDA Toolkit version you are using.
Remember: Compatibility between the GCC version and the CUDA Toolkit is crucial. Make sure the GCC version you choose is compatible with your CUDA Toolkit version.
Where are you now?
We have now created a deep learning development environment optimised for NVIDIA GPUs, with compatibility across key components.
We have so far:
-Installed CUDA Toolkit and Drivers
-Set up the NVIDIA Container Toolkit to allow access to NVIDIA Docker containers
-Ensured Host Compatibility by verifying variables such as GCC (GNU Compiler Collection) and GLIBC (GNU C Library) are compatible with the CUDA version.
-Created a Compatibility Check Script: Developing a script to check for compatibility issues
With these components in place, your environment is tailored for deep learning development.
It supports the development and execution of deep learning models, leveraging the computational power of GPUs for training and inference tasks.
Last updated
Was this helpful?