Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

← Back to Blog
hostingJune 13, 20265 min read

How to Install AMD ROCm on Ubuntu 26.04 for AI & Deep Learning

Learn how to install AMD ROCm on Ubuntu 24.04 and 26.04 for AI and deep learning. Get PyTorch running on your Radeon GPU with official Ubuntu repos.

A

Aisha Nkemdi

June 13, 2026

Why AMD ROCm on Ubuntu Finally Makes Sense for AI Workloads

In this article, we explore AMD ROCm Ubuntu — For years, AMD GPU owners running AI and deep learning workloads on Linux faced a frustrating reality: while NVIDIA users could install CUDA in minutes, ROCm setup meant wrestling with third-party repositories, mismatched driver versions, and kernel module conflicts that could consume an entire afternoon. That experience has fundamentally changed. (Read also: Reduce PDF File Size in Linux: Tools and Methods)

With Ubuntu 26.04 LTS ("Resolute Raccoon"), Canonical made a significant architectural decision — both AMD ROCm and NVIDIA CUDA are now available directly from the official Ubuntu package repositories. No external PPAs, no version mismatch rabbit holes, no manual dependency resolution. If you have a supported Radeon GPU, you can have a fully functional AMD ROCm stack ready for PyTorch, Ollama, or Stable Diffusion in under 15 minutes.

This guide covers the complete installation process: hardware verification, BIOS prerequisites, ROCm installation, kernel group permissions, and framework-level validation. The steps were validated on Ubuntu 26.04 LTS with a Radeon RX 7900 XTX and an RX 9070 XT. Permission structures and BIOS requirements apply equally to earlier Ubuntu releases running ROCm from AMD's own repository. (Read also: The Complete Guide to Cloud Migration in 2026) (Read also: VPS vs VDS vs Dedicated Servers: The Ultimate Comparison Guide)

VPS Server offers one-click installs for popular apps like this.

If you're running AI workloads at scale or need a production-grade GPU server, VPS-Server.host offers GPU-enabled cloud infrastructure worth evaluating alongside your local setup.

For expert threat detection and response, CyberXper offers managed security services.

Prerequisites

Before running a single command, confirm the following:

  • Ubuntu 26.04 LTS installed (or Ubuntu 22.04/24.04 with AMD's official ROCm repo)
  • A supported AMD Radeon GPU (RDNA3 or RDNA4 — full list below)
  • Sudo/root access to the system
  • UEFI/BIOS access to enable required PCIe settings
  • Python 3.10+ for the PyTorch validation step
  • Stable internet connection (ROCm is a large download, typically 3–5 GB)

Understanding AMD ROCm: What It Does and Why It Matters

ROCm (Radeon Open Compute) is AMD's open-source GPU compute platform — the functional equivalent of NVIDIA's CUDA. It provides the runtime environment, compilers, math libraries, and hardware abstraction layer that frameworks like PyTorch, TensorFlow, and JAX need to offload compute-intensive operations from the CPU to the GPU.

When you run a local LLM through Ollama, generate images with Stable Diffusion, or fine-tune a model with PyTorch, ROCm is the layer translating those high-level framework calls into GPU instructions. The critical architectural detail is HIP (Heterogeneous-compute Interface for Portability) — AMD's CUDA compatibility layer. HIP maps CUDA API calls onto AMD hardware, which is why torch.cuda.is_available() returns True on a Radeon card with ROCm installed. Most CUDA-targeting PyTorch code runs on ROCm without modification.

Ubuntu 26.04 ships ROCm 7.1.0. This is a stable, well-tested build, though it trails AMD's upstream release (7.2.4 as of mid-2026). For most local AI inference and training workloads, 7.1.0 is entirely sufficient. If you need cutting-edge GPU support for the newest RDNA4 variants or specific upstream features, AMD's own repository remains an option after initial setup.

Hardware Compatibility and BIOS Security Checklist

This is where most failed ROCm installations originate. ROCm has strict hardware requirements, and two BIOS-level settings must be enabled or the GPU will never appear to the ROCm runtime — regardless of how cleanly the software installs.

Supported GPU Architectures

ROCm officially supports RDNA3 and RDNA4 consumer GPUs:

Architecture Supported GPUs
RDNA4 RX 9070, RX 9070 XT, RX 9070 GRE, RX 9060 XT
RDNA3 RX 7900 XTX, RX 7900 XT, RX 7900 GRE, RX 7700 XT

Important: ROCm is AMD-exclusive. If lspci shows an NVIDIA GPU, this guide does not apply — NVIDIA cards use CUDA, which Ubuntu 26.04 also ships natively via sudo apt install nvidia-cuda-toolkit.

RDNA2 (RX 6000 Series) — Community Workaround

RDNA2 cards (Radeon RX 6000 series) are not on the official support list but can run ROCm through a GFX version override. You instruct ROCm to treat your card as the closest supported ISA target:

export HSA_OVERRIDE_GFX_VERSION=10.3.0

This maps your card's instruction set to gfx1030 (the RX 6800/6900 target), which ROCm has compiled kernels for. Cards like the RX 6700 XT (gfx1031) and RX 6600 (gfx1032) borrow this code path and work for most workloads.

Security and stability note: This is a community workaround, not an AMD-supported configuration. It can silently break after ROCm point releases, and some workloads may fall back to CPU execution without warning. Treat RX 6000 cards as best-effort for ROCm compute. For persistent use, add the override to your shell profile:

echo 'export HSA_OVERRIDE_GFX_VERSION=10.3.0' >> ~/.bashrc
source ~/.bashrc

Required BIOS Settings — Do Not Skip This

Two PCIe settings must be enabled in your system BIOS/UEFI before ROCm can initialize the GPU for compute. Without them, rocminfo will enumerate your CPU but never discover the GPU, and no amount of software troubleshooting will fix it.

Above 4G Decoding Allows the system to address GPU memory beyond the legacy 4 GB PCI addressing limit. GPU VRAM on modern cards far exceeds this threshold, and compute workloads require the full address space.

Resizable BAR (Smart Access Memory) Enables the CPU to access the GPU's full VRAM directly rather than through a 256 MB aperture. On AMD motherboards this is often labeled "Smart Access Memory" (SAM). Both settings are typically found under PCIe or Advanced settings in UEFI.

Enable both, save, and reboot before proceeding.

Step-by-Step ROCm Installation on Ubuntu

Step 1: Verify GPU Hardware Detection

Confirm the kernel sees your AMD GPU before touching the package manager:

lspci | grep -iE 'vga|3d|display'

Expected output for a supported card:

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XTX] (rev c8)

If your Radeon model appears, hardware detection is confirmed. If nothing shows, the card is not seated correctly or not receiving power — ROCm cannot address a GPU the kernel cannot see.

Also verify the KFD (Kernel Fusion Driver) device node exists:

ls -la /dev/kfd /dev/dri/

You should see /dev/kfd and render node entries under /dev/dri/. These are the device interfaces ROCm uses for compute access.

Step 2: Install ROCm from the Ubuntu Repository

Update package lists and install the ROCm metapackage:

sudo apt update
sudo apt install rocm

This single metapackage pulls in the ROCm runtime, HIP libraries, rocminfo, rocm-smi, and the math libraries that PyTorch and Ollama depend on. The download is substantial — budget 3–5 GB and several minutes depending on your connection speed.

When prompted, confirm with Y and allow the installation to complete fully before proceeding.

Step 3: Configure Kernel Group Permissions

ROCm exposes GPU compute access through /dev/kfd and /dev/dri. By default, these device nodes are restricted to members of the render and video groups. Your user account must belong to both groups or every ROCm command will fail with a permission error.

sudo usermod -aG render,video $USER

Flag breakdown:

  • -a appends to existing group memberships (omitting this flag replaces all current groups — a destructive operation)
  • -G render,video specifies both required groups
  • $USER expands to your current username automatically

Group membership changes require a new login session to take effect. Log out and back in, or reboot, then verify:

groups

Expected output (your groups will vary, but render and video must be present):

aisha adm cdrom sudo dip plugdev render video

If render or video are absent, you either skipped the logout or the usermod command failed — recheck the output of that command for errors.

Step 4: Validate ROCm GPU Discovery

With permissions configured, query the ROCm runtime directly:

rocminfo

Look for a GPU agent entry in the output:

*******
Agent 2
*******
  Name:                    gfx1100
  Marketing Name:          AMD Radeon RX 7900 XTX
  Device Type:             GPU
  Cache Info:
    L1:                      32(0x20) KB

The critical line is Device Type: GPU paired with your card's marketing name. gfx1100 is the ISA identifier for the RX 7900 XTX (RDNA3). If only your CPU appears as an agent, the issue is almost always one of two things: BIOS settings (Above 4G Decoding or Resizable BAR not enabled) or group membership not yet applied (logout required).

Next, check live GPU telemetry:

rocm-smi

Expected output:

========================= ROCm System Management Interface =========================
GPU  Temp   AvgPwr   SCLK     MCLK     Fan   Perf  VRAM%  GPU%
0    42.0c  38.0W    500Mhz   96Mhz    0%    auto  3%     0%
====================================================================================

rocm-smi is your equivalent of nvidia-smi — it reports temperature, power draw, clock speeds, VRAM utilization, and GPU load. The GPU% column is your real-time confirmation that workloads are executing on the GPU rather than falling back to CPU.

Step 5: Framework Validation with PyTorch

A clean rocminfo confirms ROCm is functional at the runtime level. The next validation is framework-level — confirming that PyTorch can discover and use the GPU.

Install PyTorch in a virtual environment (best practice for isolating framework dependencies):

python3 -m venv ~/rocm-env
source ~/rocm-env/bin/activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2

Then run the GPU availability check:

python3 -c "import torch; print('ROCm available:', torch.cuda.is_available()); print('GPU:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None')"

Expected output:

ROCm available: True
GPU: AMD Radeon RX 7900 XTX

True here means PyTorch can dispatch tensor operations to your Radeon GPU. The function name torch.cuda.is_available() is intentional — ROCm's HIP layer presents itself as a CUDA-compatible interface, so existing CUDA-targeting PyTorch code runs on AMD hardware without modification.

If you receive False, work through the troubleshooting section below before proceeding to model inference.

Troubleshooting Common ROCm Installation Issues

rocminfo shows CPU only, no GPU agent

Most likely cause: BIOS settings. Reboot into UEFI and confirm both Above 4G Decoding and Resizable BAR (Smart Access Memory) are enabled. This accounts for roughly 70% of "GPU not found" reports.

Second cause: Group membership not applied. Confirm with groups that render and video are listed. If not, re-run sudo usermod -aG render,video $USER and fully log out before testing again.

Permission denied accessing /dev/kfd

## Verify device node ownership
ls -la /dev/kfd
## Should show: crw-rw---- 1 root render

## Confirm your group membership
id $USER | grep -E 'render|video'

If the device node exists but you lack access, the group membership change hasn't propagated. A full reboot (not just terminal restart) resolves this reliably.

torch.cuda.is_available() returns False after successful rocminfo

This typically means PyTorch was installed from the standard CPU-only wheel rather than the ROCm-specific index. Reinstall explicitly targeting the ROCm wheel URL:

pip uninstall torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2

RX 6000 series: workloads crash or fall back to CPU

Confirm the override is set in your current shell session:

echo $HSA_OVERRIDE_GFX_VERSION
## Should output: 10.3.0

If empty, the variable wasn't exported in this session. Add it to ~/.bashrc permanently and source the file:

echo 'export HSA_OVERRIDE_GFX_VERSION=10.3.0' >> ~/.bashrc
source ~/.bashrc

ROCm package not found on Ubuntu versions before 26.04

On Ubuntu 22.04 or 24.04, ROCm is not in the standard repository. Use AMD's official installation script:

wget https://repo.radeon.com/amdgpu-install/latest/ubuntu/jammy/amdgpu-install_*.deb
sudo apt install ./amdgpu-install_*.deb
sudo amdgpu-install --usecase=rocm

What's Next?

With ROCm validated and PyTorch returning True, your Radeon GPU is ready for production AI workloads. Here are the logical next steps:

  • Run local LLMs with Ollama: Ollama auto-detects ROCm and will use your GPU for inference. Install with curl -fsSL https://ollama.com/install.sh | sh and pull a model with ollama pull llama3.
  • Stable Diffusion: Use Automatic1111 or ComfyUI — both support ROCm through PyTorch's HIP backend.
  • Monitor GPU utilization: Keep rocm-smi -d 0 --showuse --loop running in a second terminal during inference to confirm GPU% is climbing.
  • Scale to cloud: For workloads exceeding local GPU memory, VPS-Server.host provides GPU-enabled VPS options for running larger models. For managed cloud migration support, NinjaIT offers cloud architecture consulting.
  • Explore containerized ROCm: Running ROCm workloads in Docker with AMD's official ROCm base images adds reproducibility and isolation — see our guide on Read more about this topic.
  • Production AI infrastructure: For teams moving beyond single-GPU experimentation, review Read more about this topic before exposing any model endpoints.

Conclusion

Installing AMD ROCm on Ubuntu 26.04 is no longer the multi-hour ordeal it once was. With ROCm available directly from Ubuntu's official repositories, the entire process — hardware verification, package installation, permission configuration, and framework validation — takes under 15 minutes on supported hardware.

The critical success factors remain consistent: confirm BIOS-level PCIe settings before touching apt, ensure your user belongs to the render and video groups before running rocminfo, and validate at the framework level with PyTorch rather than stopping at the runtime check. With those three checkpoints cleared, your AMD Radeon GPU is a fully capable AI compute device running AMD ROCm on Ubuntu.

For teams deploying ROCm at scale or looking to move GPU workloads to cloud infrastructure, explore the resources at Data Mammoth for additional guides on AI infrastructure and GPU compute optimization.

#hosting

Related Services

VPS Hosting →

Deploy on high-performance SSD servers

View Plans →

Cloud VPS plans from $4.99/mo

Share this article

Twitter / XLinkedInFacebook

Related Articles

hosting

The Compliance Gap in AI-Native Infrastructure: SOC2 and Data Residency for GPU Workloads

5 min read
hosting

Running OpenBao on Kubernetes with a CloudNativePG PostgreSQL backend

5 min read
hosting

Kubernetes v1.37: Hardening Container Storage with Bind Mount Options and EmptyDir Permissions

5 min read