Jump to content

GPU Status

From RidgeRun Developer Wiki

Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page



GPU Status

One of the main hardware components is the GPU. Here, a CUDA test is conducted to exercise the GPU unit and shows usage with a tegrastats output.

Check CUDA installation

1. Check if CUDA is installed on the board:

ls /usr/local/cuda/

2. If not, execute the following command:

sudo apt install cuda-toolkit*

3. Add the following lines to the ~/.bashrc file:

export PATH=/usr/local/cuda-11.4/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH

4. Apply the changes:

source ~/.bashrc

5. Check CUDA version with nvcc

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Sun_Oct_23_22:16:07_PDT_2022
Cuda compilation tools, release 11.4, V11.4.315
Build cuda_11.4.r11.4/compiler.31964100_0

Execute a CUDA sample

For this sample, the /usr/local/cuda/samples/1_Utilities/bandwidthTest is executed.

1. Move to the /usr/local/cuda/samples/1_Utilities/bandwidthTest directory

cd /usr/local/cuda/samples/1_Utilities/bandwidthTest

2. Build the sample:

sudo make

3. Execute the sample:

sudo ./bandwidthTest

4. Check the expected outputs:

sudo ./bandwidthTest
[CUDA Bandwidth Test] - Starting...
Running on...

 Device 0: Xavier
 Quick Mode

 Host to Device Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)	Bandwidth(GB/s)
   32000000			3.2

 Device to Host Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)	Bandwidth(GB/s)
   32000000			3.2

 Device to Device Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)	Bandwidth(GB/s)
   32000000			51.0

Result = PASS

NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
nvidia@ubuntu:/usr/local/cuda/samples/1_Utilities/bandwidthTest$ date
mié  3 jun 10:24:21 CST 2026

For the tegrastats output, run the following command:

sudo tegrastats --readall

Expected output:

06-03-2026 10:24:22 RAM 1002/15080MB (lfb 3325x4MB) SWAP 0/7540MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1268,3%@1190,0%@1190,13%@1191,0%@1190] EMC_FREQ 5%@204 GR3D_FREQ 99%@[114] VIC_FREQ 1036 APE 150 AUX@33C CPU@34C thermal@33.6C Tboard@35C AO@33.5C GPU@34C Tdiode@37C GPU 309mW/257mW CPU 928mW/619mW SOC 1238mW/877mW CV 0mW/0mW VDDRQ 154mW/154mW SYS5V 1211mW/1116mW




Cookies help us deliver our services. By using our services, you agree to our use of cookies.