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. /How-to
  5. /How to install ROCm for AMD GPUs
HOW-TO · SET

How to install ROCm for AMD GPUs

advanced·30 min·By Eruo Fredoline
Target environment
Ubuntu 24.04 · Ollama 0.4.xWindows 11 · Ollama 0.4.xmacOS 15 · Ollama 0.4.x
PREREQUISITES

AMD GPU (RX 7000 series or Instinct MI series), Ubuntu 22.04 LTS, root access

What this does

Installs the ROCm (Radeon Open Compute) stack on an Ubuntu host, providing the kernel driver, user-space runtime, and HIP toolchain needed to execute GPU-accelerated workloads on AMD hardware. After completion, frameworks supporting HIP can offload compute to AMD GPUs.

Steps

  1. Add the AMD ROCm repository.

    wget -qO - https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm.gpg
    echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/6.2/ ubuntu main" | sudo tee /etc/apt/sources.list.d/rocm.list
    

    Expected output: Repository entry appended.

  2. Install the ROCm packages.

    sudo apt-get update
    sudo apt-get install -y rocm-llvm rocm-smi rocm-device-libs
    

    Expected output: Packages unpacked and DKMS modules built.

  3. Add ROCm binary paths to the environment.

    echo 'export PATH=/opt/rocm/bin:$PATH' | sudo tee /etc/profile.d/rocm.sh
    source /etc/profile.d/rocm.sh
    

    Expected output: New shell sessions now include ROCm binaries.

  4. Reboot to load the amdgpu kernel module.

    sudo reboot
    

    Expected output: System restarts.

Verification

rocm-smi --showproductname --showdriverversion
# Expected: GPU product name listed, driver version shown

Common failures

  • Fatal error during GPU init — GPU may be in an unsupported PCIe configuration. Verify the card is firmly seated.
  • ROCm installation on kernel version not supported — DKMS driver build failed. Install a compatible kernel LTS branch.
  • GPU not visible after reboot — Secure Boot may block the amdgpu module. Disable Secure Boot in UEFI settings.
  • rocm-smi: command not found — PATH not updated. Source /etc/profile.d/rocm.sh explicitly.
  • Package version conflict — Run sudo apt-get remove --purge rocm* amdgpu-dkms before reinstalling.
  • /opt/rocm not found after install — The install prefix may differ. Check /opt/rocm-* for versioned directories and update PATH accordingly.
  • HIP runtime cannot find GPU — No GPU topology file present. Ensure amdgpu kernel module loaded with lsmod | grep amdgpu.

Related guides

  • How to configure PyTorch with GPU support
  • How to verify CUDA setup for AI workloads
  • Course Local AI Fundamentals
RELATED GUIDES
SET
How to configure PyTorch with GPU support
SET
How to verify CUDA setup for AI workloads
← All how-to guidesCourses →