Installation via AMDGPU installer#

Applies to Linux

2024-02-16

9 min read time

amdgpu-install is a tool that helps you install and update AMDGPU and ROCm and its 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.

Make sure that the Installation prerequisites are met before installing.

Ubuntu#

sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.0.2/ubuntu/jammy/amdgpu-install_6.0.60002-1_all.deb
sudo apt install ./amdgpu-install_6.0.60002-1_all.deb
sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.0.2/ubuntu/focal/amdgpu-install_6.0.60002-1_all.deb
sudo apt install ./amdgpu-install_6.0.60002-1_all.deb

Red Hat Enterprise Linux#

sudo yum install https://repo.radeon.com/amdgpu-install/6.0.2/rhel/9.3/amdgpu-install-6.0.60002-1.el9.noarch.rpm
sudo yum install https://repo.radeon.com/amdgpu-install/6.0.2/rhel/9.2/amdgpu-install-6.0.60002-1.el9.noarch.rpm
sudo yum install https://repo.radeon.com/amdgpu-install/6.0.2/rhel/8.9/amdgpu-install-6.0.60002-1.el8.noarch.rpm
sudo yum install https://repo.radeon.com/amdgpu-install/6.0.2/rhel/8.8/amdgpu-install-6.0.60002-1.el8.noarch.rpm

SUSE Linux Enterprise#

sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/6.0.2/sle/15.5/amdgpu-install-6.0.60002-1.noarch.rpm
sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/6.0.2/sle/15.4/amdgpu-install-6.0.60002-1.noarch.rpm

Use cases#

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

To display a list of available use cases execute the command:

sudo amdgpu-install --list-usecase

The available use-cases will be printed in a format similar to the example output below.

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

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 ASAN (Address Sanitizer) instrumented binaries of 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 the following commands can be used.

  • 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
    

Multi-versioned ROCm Installation#

By default (without the --rocmrelease option) the installer script will install packages in the single-version layout.

For the multi-version ROCm installation you must use the installer script from the latest release of ROCm that you wish to install.

Example: If you want to install ROCm releases 5.5.3, 5.6.1 and 5.7 simultaneously, you are required to download the installer from the latest ROCm release 5.7.

You must add the ROCm repositories manually for all ROCm releases you want to install except the latest one. The amdgpu-install script automatically adds the required repositories for the latest release.

See the section “Register ROCm Packages” in Installation via native package manager for Ubuntu.

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 wish 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.