Installation via AMDGPU installer#

Applies to Linux

2024-10-03

8 min read time

amdgpu-install is a tool that helps you install and update AMDGPU, ROCm, and ROCm components.

Warning

ROCm doesn’t currently support integrated graphics. Should your system have an AMD IGP installed, disable it in the BIOS prior to using ROCm. If the driver can enumerate the IGP, the ROCm runtime may crash the system, even if told to omit it via HIP_VISIBLE_DEVICES.

Installation#

Installation of amdgpu-install differs slightly depending on the OS and its package manager.

Important

Make sure that the Installation prerequisites are met before installing.

Ubuntu#

sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.2.1/ubuntu/noble/amdgpu-install_6.2.60201-1_all.deb
sudo apt install ./amdgpu-install_6.2.60201-1_all.deb
sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.2.1/ubuntu/jammy/amdgpu-install_6.2.60201-1_all.deb
sudo apt install ./amdgpu-install_6.2.60201-1_all.deb

Red Hat Enterprise Linux#

sudo yum install https://repo.radeon.com/amdgpu-install/6.2.1/el/9.4/amdgpu-install-6.2.60201-1.el9.noarch.rpm
sudo yum install https://repo.radeon.com/amdgpu-install/6.2.1/el/9.3/amdgpu-install-6.2.60201-1.el9.noarch.rpm
sudo yum install https://repo.radeon.com/amdgpu-install/6.2.1/el/8.10/amdgpu-install-6.2.60201-1.el8.noarch.rpm
sudo yum install https://repo.radeon.com/amdgpu-install/6.2.1/el/8.9/amdgpu-install-6.2.60201-1.el8.noarch.rpm

SUSE Linux Enterprise#

sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/6.2.1/sle/15.6/amdgpu-install-6.2.60201-1.noarch.rpm
sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/6.2.1/sle/15.5/amdgpu-install-6.2.60201-1.noarch.rpm

Use cases#

Instead of installing individual applications or libraries, the installer script groups packages into specific use cases that match typical workflows and runtimes.

To display a list of available use cases, run:

sudo amdgpu-install --list-usecase

The available use-cases are printed in a format similar to:

If --usecase option is not present, the default selection is "graphics,opencl,hip"

Available use cases:
dkms            (to only install the kernel mode driver)
  - Kernel mode driver (included in all usecases)
graphics        (for users of graphics applications)
  - Open source Mesa 3D graphics and multimedia libraries
multimedia      (for users of open source multimedia)
  - Open source Mesa 3D multimedia libraries
multimediasdk   (for developers of open source multimedia)
  - Open source Mesa 3D multimedia libraries
  - Development headers for multimedia libraries
workstation     (for users of legacy WS applications)
  - Open source multimedia libraries
  - Closed source (legacy) OpenGL
rocm            (for users and developers requiring full ROCm stack)
  - OpenCL (ROCr/KFD based) runtime
  - HIP runtimes
  - Machine learning framework
  - All ROCm libraries and applications
rocmdev         (for developers requiring ROCm runtime and
                profiling/debugging tools)
  - HIP runtimes
  - OpenCL runtime
  - Profiler, Tracer and Debugger tools
rocmdevtools    (for developers requiring ROCm profiling/debugging tools)
  - Profiler, Tracer and Debugger tools
amf             (for users of AMF based multimedia)
  - AMF closed source multimedia library
lrt             (for users of applications requiring ROCm runtime)
  - ROCm Compiler and device libraries
  - ROCr runtime and thunk
opencl          (for users of applications requiring OpenCL on Vega or later
                products)
  - ROCr based OpenCL
  - ROCm Language runtime
openclsdk       (for application developers requiring ROCr based OpenCL)
  - ROCr based OpenCL
  - ROCm Language runtime
  - development and SDK files for ROCr based OpenCL
hip             (for users of HIP runtime on AMD products)
  - HIP runtimes
hiplibsdk       (for application developers requiring HIP on AMD products)
  - HIP runtimes
  - ROCm math libraries
  - HIP development libraries
openmpsdk       (for users of openmp/flang on AMD products)
  - OpenMP runtime and devel packages
mllib           (for users executing machine learning workloads)
  - MIOpen hip/tensile libraries
  - Clang OpenCL
  - MIOpen kernels
mlsdk           (for developers executing machine learning workloads)
  - MIOpen development libraries
  - Clang OpenCL development libraries
  - MIOpen kernels
asan            (for users of ASAN enabled ROCm packages)
  - ASAN enabled OpenCL (ROCr/KFD based) runtime
  - ASAN enabled HIP runtimes
  - ASAN enabled Machine learning framework
  - ASAN enabled ROCm libraries

Install amdgpu-dkms#

In order to install only the DKMS, which is a minimal requirement for launching containers with GPU access, use the dkms use case:

amdgpu-install --usecase=dkms

Upgrading ROCm#

The upgrade procedure with the installer script is exactly the same as installing for first time use.

Installing ROCm packages#

To install use cases specific to your requirements, use the installer (amdgpu-install) as follows:

  • To install a single use case, add it with the --usecase option:

    sudo amdgpu-install --usecase=rocm
    
  • For multiple use cases, separate them with commas:

    sudo amdgpu-install --usecase=hiplibsdk,rocm
    
  • For graphical workloads using the open-source driver, add graphics. For example:

    sudo amdgpu-install --usecase=graphics,rocm
    
  • For graphical workloads using the proprietary driver, add workstation. For example:

    sudo amdgpu-install --usecase=workstation,rocm
    
  • To install LLVM AddressSanitizer (ASAN) instrumented binaries (for packages that support it), add asan. For example:

    sudo amdgpu-install --usecase=rocm,asan
    

Uninstalling ROCm#

To uninstall all ROCm packages and the kernel-mode driver, use the following commands.

  • Uninstalling single-version install

    sudo amdgpu-install --uninstall
    
  • Uninstalling a specific ROCm release

    sudo amdgpu-install --uninstall --rocmrelease=<release-number>
    
  • Uninstalling all ROCm releases

    sudo amdgpu-install --uninstall --rocmrelease=all
    

Additional options#

  • Unattended installation.

    Adding -y as a parameter to amdgpu-install skips user prompts (for automation). For example:

    amdgpu-install -y --usecase=rocm
    
  • Skipping kernel mode driver installation.

    The installer script tries to install the kernel mode driver along with the requested use cases. This might be unnecessary (as in the case of Docker containers) or you may want to keep a specific version when using multi-version installation, and not have the last installed version overwrite the kernel mode driver.

    To skip the installation of the kernel-mode driver, add the --no-dkms option when calling the installer script.