CUDA: Difference between revisions

From NU HPC Wiki
Jump to navigation Jump to search
(Created page with "CUDA (Compute Unified Device Architecture) is a parallel computing platform and application programming interface model created by NVIDIA. It allows to use NVIDIA graphics processing units (GPUs) for general purpose processing. '''Usage:''' module load cuda/11.4.1 To check GPUs on GPU nodes: <code>nvidia-smi --list-gpus</code>")
 
No edit summary
 
Line 1: Line 1:
CUDA (Compute Unified Device Architecture) is a parallel computing platform and application programming interface model created by NVIDIA. It allows to use NVIDIA graphics processing units (GPUs) for general purpose processing.  
CUDA (''Compute Unified Device Architecture'') is a parallel computing platform and application programming interface (API) model created by NVIDIA. It allows software developers to use a CUDA-enabled graphics processing unit (GPU) for general purpose processing, an approach known as ''General Purpose GPU'' (GPGPU) computing.  


'''Usage:''' module load cuda/11.4.1
'''Usage:''' module load cuda/11.4.1


To check GPUs on GPU nodes: <code>nvidia-smi --list-gpus</code>
==== Executables ====
nvcc
 
nvidia-smi
 
=== Monitoring GPU ===
You can check the available GPUs, their current usage, installed version of the nvidia drivers, and more with the command <code>nvidia-smi</code>. Either in an interactive job or after connecting to a node running your job with <code>ssh</code>, <code>nvidia-smi</code> output should look something like this:
<code>[hpcadmin@gn01 ~]$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|        Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|  0  GeForce GTX 108...  On  | 00000000:02:00.0 Off |                  N/A |
| 23%  34C    P8    9W / 250W |      1MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes:                                                      GPU Memory |
|  GPU      PID  Type  Process name                            Usage      |
|=============================================================================|
|  No running processes found                                                |
+-----------------------------------------------------------------------------+</code>

Latest revision as of 07:18, 3 July 2024

CUDA (Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) model created by NVIDIA. It allows software developers to use a CUDA-enabled graphics processing unit (GPU) for general purpose processing, an approach known as General Purpose GPU (GPGPU) computing.

Usage: module load cuda/11.4.1

Executables

nvcc

nvidia-smi

Monitoring GPU

You can check the available GPUs, their current usage, installed version of the nvidia drivers, and more with the command nvidia-smi. Either in an interactive job or after connecting to a node running your job with ssh, nvidia-smi output should look something like this:

[hpcadmin@gn01 ~]$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  On   | 00000000:02:00.0 Off |                  N/A |
| 23%   34C    P8     9W / 250W |      1MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+