Installing ROCm Libraries on Linux for AMD GPUs
Installing ROCm Libraries on Linux for AMD GPUs
Getting your AMD GPU ready for AI workloads requires the ROCm (Radeon Open Compute) stack. While the official installation process is straightforward, there is one critical detail that can save you from system instability.
The Installation Process
To install the necessary ROCm libraries and tools, use the amdgpu-install script provided by AMD. You can download and install the latest version of the ROCm package from the official AMD website: AMD Linux Drivers.
The Critical Tip: Avoid DKMS
When running the installation command, it is highly recommended to not install the DKMS kernel drivers. The DKMS driver version is often unstable and can lead to kernel panics or boot issues on many Linux distributions.
Instead, use the --no-dkms flag to rely on the built-in kernel drivers.
The Command
Run the following command in your terminal:
amdgpu-install -y --usecase=rocm --no-dkms
Why use --no-dkms?
The --no-dkms flag ensures that the installer does not attempt to compile and install a separate kernel module. For most users, the drivers already included in the Linux kernel are more stable and sufficient for ROCm to function correctly.
Verification
After installation and a system reboot, you can verify that your GPU is recognized by ROCm by running:
rocminfo
If the output lists your GPU correctly, you are ready to start running LLMs and other AI models on your AMD hardware.