The new version of Nvidia CUDA 10.2 is here, know what's new and how to install it

Nvidia CUDA

A new version of the general purpose graphics programming API NVIDIA CUDA 10.2, almost ten months after version 10.1. This library includes the addition of a full API for virtual memory management on the graphics card, with more precise functions for memory allocation and memory address ranges.

Cuda is a parallel computing platform created by Nvidia which can be used to increase performance by harnessing the power of the graphics processing unit (GPU) in your system. Cuda is a software layer allowing software developers to access the GPU's virtual instruction set and to the parallel computational elements, for the execution of the computing cores.

CUDA try to exploit the advantages of GPUs over CPUs general purpose using the parallelism offered by its multiple cores, which allow the launch of a very high number of simultaneous threads.

Therefore, if an application is designed using multiple threads that perform independent tasks (which is what GPUs do when processing graphics, their natural task), a GPU will be able to offer great performance.

What's new in Nvidia CUDA 10.2?

This version is packed with libraries that offer new and extended functionality., bug fixes, and performance improvements for single and multiple GPU environments.

In this version added a new interoperability layer of your operating system in real time (RTOS) for NVIDIA DRIVE OS, LLAMADA NVIDIA Software Communication Interface Interoperability.

There are two main interfaces available: NvSciBuf for the exchange of complete memory areas and NvSciSync for synchronization. These features are in the preview.

At the level of managed platforms, CUDA 10.2 is the latest version that will be available for macOS, In addition, RHEL 6 will no longer be supported as RHEL 2010 will no longer be supported at all in the next version of CUDA (as are Microsoft C ++ compilers 2013 to XNUMX).

In addition to that Nvidia also prepares a small type on the available functions. Now that nvJPEG is a separate library, the corresponding NPP Compression Primitives functions are about to disappear.

Of the other changes that stand out from the ad, We may find that performance and scalability were improved for the following use cases:

  • Multi-GPU without 2 transform power
  • R2C and Z2D odd-sized transformations
  • 2D transformations with small sizes and large number of batches.

If you want to know more about this new version of CUDA, you can consult the following link.

How to install Nvidia CUDA on Ubuntu and derivatives?

In order to install CUDA on the system, it is necessary that we have the Nvidia drivers installed. If you still do not have them, you can consult the following article.

Now as a first step we must download the CUDA installation script, which we can obtain from a terminal by typing the following command:

wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run

Done this now we have to give execution permissions to the script with:

sudo chmod +x cuda_10.2.89_440.33.01_linux.run

We are going to install some necessary packages.

sudo apt-get install gcc-6 g++-6 linux-headers-$(uname -r) -y

sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev

And now we are going to run the script with:

sudo sh cuda_10.2.89_440.33.01_linux.run

During the installation process we will be asked some questions of which we will have to answer, basically it will ask us if we accept the conditions of use, if we want to change the default directory, among other things.

Where they should pay attention is when they are asked if you want to install the Nvidia drivers where they will answer no since they must have them installed.

After you have completed the installation, they just have to set their environment variables in the file that we are going to create in the following path /etc/profile.d/cuda.sh.

sudo nano /etc/profile.d/cuda.sh

And in the we are going to place the following content:

export PATH=$PATH:/usr/local/cuda/bin

export CUDADIR=/usr/local/cuda

They also create the file:

sudo nano /etc/ld.so.conf.d/cuda.conf

And we add the line:

/usr/local/cuda/lib64

And finally we execute:

export PATH=/usr/local/cuda-10.2/bin:/usr/local/cuda-10.2/NsightCompute-2019.1${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64\
 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
sudo ldconfig