RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /Local AI on Linux
  6. /Ch. 4
Local AI on Linux

04. ROCm for AMD GPUs

Chapter 4 of 15 · 20 min
KEY INSIGHT

ROCm exposes GPUs through `/dev/kfd` and requires membership in the `video` and `render` groups—not through `nvidia-smi` or `/dev/nvidia*`.

ROCm (Radeon Open Compute) is AMD's open-source GPU compute stack. It runs on Linux only. The install process differs significantly from NVIDIA because ROCm exposes the GPU through /dev/kfd (Kernel FD) and the user-space runtime uses HSA Runtime.

Check your GPU's supported OS and ROCm version before installing. The AMD GPU list at rocm.docs.amd.com shows which architectures are supported by which ROCm versions. For example, an RX 7900 XTX (gfx1100) requires ROCm 6.1 or later. An RX 6800 XT (gfx1030) works with ROCm 5.x and 6.x.

Install ROCm on Ubuntu 22.04:

sudo apt install rocm-runtime rocm-hip-runtime rocminfo
sudo usermod -aG video $USER
sudo usermod -aG render $USER
reboot

Verify after reboot:

/opt/rocm/bin/rocminfo
# Expected snippet:
# ROCm Platform Agent
#   Name:                    gfx1030
#   Marketing Name:          AMD Radeon RX 6800 XT
#   Vendor Name:             AMD
#   Type:                    GPU
#  supports: HSA, KFD

Check compute devices:

/opt/rocm/opencl/bin/clinfo
# Expected: Number of platforms: 1
#   Platform Name: AMD Accelerated Parallel Processing
#   Number of devices: 1

Failure mode: rocminfo returns No devices found but the driver loaded. The user was not added to the video and render groups before running the check. Re-run sudo usermod -aG video $USER && sudo usermod -aG render $USER and log out/in.

Failure mode: rocminfo fails with hsa api call failure [-1] and Could not load amdhsak64.so. The ROCm user-space libraries are not in the linker path. Add export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH to your shell profile.

Failure mode: ROCm 6.1 installed but llama.cpp only has HIP support for gfx1030 compiled in. You compiled llama.cpp expecting HIP backend support and hipgetopt was not found. Check rocminfo for your agent name and confirm it matches the architecture llama.cpp was compiled for. Not all ROCm versions support all architectures.

EXERCISE

Install ROCm on an AMD GPU machine, verify rocminfo output, and run clinfo to confirm OpenCL device detection. Note the gfx architecture identifier.

← Chapter 3
CUDA Toolkit Setup
Chapter 5 →
Ollama on Linux