Red Hat Enterprise Linux native installation#

Applies to Linux

2024-06-19

7 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.1.1/rhel/9.4/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo yum clean all

Note

RHEL 9.4 is supported only on AMD Instinct MI300A.

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

Register ROCm packages#

sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.1.1]
name=ROCm6.1.1
baseurl=https://repo.radeon.com/rocm/rhel9/6.1.1/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF

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

sudo yum clean all

Installation#

Install kernel driver#

sudo yum install amdgpu-dkms
sudo reboot

Install ROCm packages#

sudo yum install rocm

Complete the Post-installation instructions.

Multi-version install#

Multi-version install is for the special case, when you need multiple versions of ROCm on the same machine, not just the newest. If you just want to install the latest use the steps in Register repositories and Installation.

Register kernel-mode driver#

for ver in 6.1.1 6.1.0; do
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/rhel/9.4/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo yum clean all

Note

RHEL 9.4 is only supported on AMD Instinct MI300A.

for ver in 6.1.1 6.1.0; do
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/rhel/9.3/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo yum clean all
for ver in 6.1.1 6.1.0; do
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/rhel/9.2/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo yum clean all
for ver in 6.1.1 6.1.0; do
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/rhel/8.9/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo yum clean all
for ver in 6.1.1 6.1.0; do
sudo tee /etc/yum.repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/rhel/8.8/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done
sudo yum clean all

Register ROCm packages#

for ver in 6.1.1 6.1.0; do
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-$ver]
name=ROCm6.1.1
baseurl=https://repo.radeon.com/rocm/rhel9/$ver/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done

sudo yum clean all
for ver in 6.1.1 6.1.0; do
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-$ver]
name=ROCm6.1.1
baseurl=https://repo.radeon.com/rocm/rhel8/$ver/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
done

sudo yum clean all

Installing#

Install kernel driver.

sudo yum install amdgpu-dkms
sudo reboot

Install ROCm packages.

for ver in 6.1.1 6.1.0; do
    sudo yum install rocm$ver
done

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 yum remove rocm
# Or for version specific packages:
sudo yum remove rocm6.1.1

Uninstall ROCm packages#

sudo yum remove rocm-core
# Or for version specific packages:
sudo yum remove rocm-core6.1.1

Uninstall kernel-mode driver#

sudo yum 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 yum clean all

# Restart the system.
sudo reboot