Skip to content
Latchkey

rocm-smi: Check AMD GPUs in CI

rocm-smi reports AMD GPU status (temperature, utilization, memory, clocks) on ROCm systems, the way nvidia-smi does for NVIDIA.

On AMD runners, rocm-smi is your first check. It confirms the amdgpu driver and ROCm stack see the cards before any HIP or PyTorch-ROCm workload runs.

What it does

rocm-smi queries the AMD ROCm/amdgpu stack and prints per-GPU temperature, power, utilization, VRAM use, and clocks. Subcommands narrow the output; rocminfo gives the deeper capability dump.

Common usage

Terminal
rocm-smi
# just utilization and memory
rocm-smi --showuse --showmemuse
# detailed device/agent info
rocminfo

Options

FlagWhat it does
(no args)Summary table of all GPUs
--showuseShow GPU utilization
--showmemuseShow VRAM usage
--showtempShow temperatures
-d <id>Restrict to a specific GPU
rocminfoFull agent/capability listing

In CI

Run rocm-smi first on AMD runners. For PyTorch-ROCm, torch.cuda.is_available() still returns True when the ROCm build works, since PyTorch maps HIP under the cuda namespace. Set HIP_VISIBLE_DEVICES (or ROCR_VISIBLE_DEVICES) to pin GPUs.

Common errors in CI

"rocm-smi: command not found" means ROCm is not installed. "ERROR: GPU[all]: No GPUs detected" or an empty table means the amdgpu kernel driver is not loaded or the container lacks device access; a container needs --device=/dev/kfd --device=/dev/dri and the right group. A kernel/ROCm version mismatch shows up as the driver not initializing.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →