AMD ROCm (Radeon Open Compute) is an open-source platform for GPU computing. This guide walks through installing ROCm on Rocky Linux 10.
Prerequisites
- Rocky Linux 10 installed
- AMD GPU (check compatibility at ROCm compatibility list)
- Root or sudo access
- Stable internet connection
System Requirements
# Check your GPU
lspci | grep -i amd
# Verify kernel version (5.x or higher recommended)
uname -r
Installation Steps
1. Add ROCm Repository
# Add the ROCm repository
sudo tee /etc/yum.repos.d/rocm.repo <<EOF
[ROCm]
name=ROCm
baseurl=https://repo.radeon.com/rocm/rhel9/rpm
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
2. Install ROCm
# Update package cache
sudo dnf clean all
sudo dnf update
# Install ROCm
sudo dnf install rocm-hip-sdk rocm-opencl-sdk
3. Configure User Permissions
# Add user to video and render groups
sudo usermod -a -G video,render $USER
# Log out and back in for changes to take effect
4. Verify Installation
# Check ROCm version
rocminfo
# Test with rocm-smi
rocm-smi
# Verify HIP installation
hipconfig
Post-Installation
Set Environment Variables
Add to ~/.bashrc:
export PATH=$PATH:/opt/rocm/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib
Test GPU Compute
# Clone ROCm examples
git clone https://github.com/ROCm/HIP-Examples.git
cd HIP-Examples/vectorAdd
# Compile and run
make
./vectorAdd
Troubleshooting
GPU Not Detected
# Check if amdgpu driver is loaded
lsmod | grep amdgpu
# If not, load it manually
sudo modprobe amdgpu
Permission Denied Errors
Ensure you’re in the correct groups:
groups $USER
# Should show: video render
Next Steps
- Install PyTorch with ROCm support
- Set up TensorFlow for AMD GPUs
- Explore ROCm libraries (rocBLAS, rocFFT, etc.)
Resources
Last updated: Feb 20, 2025