Tool to display AMDGPU usage
amdgpu_top is tool that display AMD GPU utilization, like umr or clbr/radeontop or intel_gpu_top.
The tool displays information gathered from performance counters (GRBM, GRBM2), sensors, fdinfo, and AMDGPU driver.
| Simple TUI (like nvidia-smi, rocm-smi) |
TUI (light) | TUI (dark) | GUI |
|---|---|---|---|
cargo run -- [options ..]
# or
amdgpu_top [options ..]# Run TUI mode
amdgpu_top
# Run GUI mode
amdgpu_top --gui
# Run SMI mode
amdgpu_top --smi
# Dump AMDGPU info
amdgpu_top -d
# Dump AMDGPU info and gpu_metrics
amdgpu_top -d -gm
# Dump AMDGPU info and pp_table
amdgpu_top -d --pp-table
# Dump AMDGPU info in JSON format
amdgpu_top -d --json
# Dump DRM info
amdgpu_top --drm-info
# Decode gpu_metrics file
amdgpu_top --decode-gm <path>
# Decode gpu_metrics file and output in JSON format
amdgpu_top --json --decode-gm <path>…| key | |
|---|---|
| g | toggle GRBM |
| r | toggle GRBM2 |
| v | toggle VRAM/GTT Usage |
| f | toggle fdinfo |
| n | toggle Sensors |
| m | toggle GPU Metrics |
| h | change update interval (high = 100ms, low = 1000ms) |
| q | Quit |
| P | sort fdinfo by pid |
| M | sort fdinfo by VRAM usage |
| G | sort fdinfo by GFX usage |
| M | sort fdinfo by MediaEngine usage |
| R | reverse sort |
$ amdgpu_top --json | jq -c -r '(.devices[] |
(.Info | .DeviceName + " (" + .PCI + "): ") +
([.gpu_activity | to_entries[] | .key + ": " + (.value.value|tostring) + .value.unit] |
join(", ")))'AMD Radeon RX 6600 (0000:03:00.0): GFX: 13%, MediaEngine: 0%, Memory: 4%
AMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%
AMD Radeon RX 6600 (0000:03:00.0): GFX: 15%, MediaEngine: 0%, Memory: 5%
AMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%
AMD Radeon RX 6600 (0000:03:00.0): GFX: 3%, MediaEngine: 0%, Memory: 2%
AMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%
...fdinfo for the AMDGPU driver shows hardware IP usage per process.
GPU Memory.
Graphics Translation Tables.
The process of using the AMDKFD driver.
GFX engine.
Compute engine.
The AMDKFD driver does not track queues and does not show them in fdinfo.
DMA/SDMA (System DMA) engine.
Media decoder.
This is not show on VCN4 or later.
Media encoder.
This is not show on VCN4 or later.
Media engine.
From VCN4, the encoding queue and decoding queue have been unified.
The AMDGPU driver handles both decoding and encoding as contexts for the encoding engine.
This is the average of the video decoder/encoder and the JPEG decoder usage.
JPEG decoder.
Video Processor Engine.
ref: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vpelib/README.md?ref_type=heads
The video decoder/encoder usage for VCN4.
sudo pacman -S amdgpu_topsudo dnf install amdgpu_topsudo eopkg it amdgpu_topcargo install amdgpu_top
# or
git clone https://github.com/Umio-Yasuno/amdgpu_top
cd amdgpu_top
cargo install --locked --path .cargo install --locked --path . --no-default-features --features="tui"sudo apt install libdrm-devsudo dnf install libdrm-devel| Features | Size (stripped) |
|---|---|
| json | ~1.1M |
| tui | ~1.5M |
| json, tui | ~1.7M |
| json, tui, gui | ~18M |
/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.camdgpu_allowed_register_entry/drivers/gpu/drm/amd/amdgpu/{cik,nv,vi,si,soc15,soc21}.camdgpu_top is using cargo-i18n with Project Fluent for translation.
Please refer to pop-os/popsicle for additional supported languages.
If amdgpu_top is not enough for you or you don't like it, try the following applications.
AMD_DEBUG=info <opengl application> or RADV_DEBUG=info <vulkan application>Support for XDNA NPU is currently limited as the developers do not have access to the necessary hardware for verification.
No open issues yet, or sync has not completed.