This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

Red Hat Enterprise Linux native installation#

Applies to Linux

2024-07-25

5 min read time

Register repositories#

Register kernel-mode driver#

sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2/el/9.4/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2/el/9.3/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2/el/8.10/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/6.2/el/8.9/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all

Register ROCm packages#

sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.2]
name=ROCm6.2
baseurl=https://repo.radeon.com/rocm/el9/6.2/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.2]
name=ROCm6.2
baseurl=https://repo.radeon.com/rocm/el8/6.2/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo dnf clean all

Installation#

Install kernel driver#

sudo dnf install amdgpu-dkms
sudo reboot

Install ROCm packages#

sudo dnf install rocm

Complete the Post-installation instructions.

Upgrade#

To upgrade an existing ROCm installation to a newer version, follow the steps in Register repositories and Installation.

Note

Upgrading the kernel driver may also upgrade the GPU firmware, which requires a system reboot to take effect.

Uninstall#

Uninstall specific meta packages#

# sudo apt autoremove <package-name>
# For example:
sudo dnf remove rocm
# Or for version specific packages:
sudo dnf remove rocm6.2

Uninstall ROCm packages#

sudo dnf remove rocm-core
# Or for version specific packages:
sudo dnf remove rocm-core6.2

Uninstall kernel-mode driver#

sudo dnf remove amdgpu-dkms

Remove ROCm and AMDGPU repositories#

# Remove the repositories.
sudo rm /etc/yum.repos.d/rocm.list
sudo rm /etc/yum.repos.d/amdgpu.list

# Clear the cache and clean the system.
sudo rm -rf /var/cache/yum
sudo dnf clean all

# Restart the system.
sudo reboot