.. meta::
   :description lang=en: Install ROCm Validation Suite (RVS)
   :keywords: rocm, core, sdk, rvs, validation, suite, install

*****************************
Install ROCm Validation Suite
*****************************

ROCm Validation Suite (RVS) is supported on AMD Instinct and Radeon GPUs
supported by ROCm. See the `ROCm compatibility matrix <https://rocm.docs.amd.com/en/latest/compatibility/compatibility-matrix.html>`__ for support information.

For advanced workflows, source builds, or custom configurations, see
`<https://github.com/ROCm/ROCmValidationSuite#rocmvalidationsuite>`__.

.. note::
   TransferBench is now a part of the ROCm Validation Suite and is installed with it.
   See the `TransferBench documentation <https://rocm.docs.amd.com/projects/TransferBench/en/latest/>`__ for more information.

Prerequisites
=============

Install the ROCm Core SDK before installing RVS.

For instructions, see `Install AMD ROCm <https://rocm.docs.amd.com/en/latest/install/rocm.html>`__. Use the
selector panel on that page to view instructions appropriate for your system environment.

ROCm installation path
----------------------

The ROCm installation path depends on what installation method was selected during
ROCm installation. After installation, the ROCm Core SDK will be deployed to this
path location and contains all the core ROCm directories such as ``bin``, ``include``,
and ``lib``. When configuring the environment for RVS, you must set the
``ROCM_INSTALL_PATH`` environment variable to the ROCm core installation directory
``<rocm-core-path>`` based on the installation method used:

.. tab-set::

   .. tab-item:: Package manager

      .. code-block:: bash

         ROCM_INSTALL_PATH=/opt/rocm/core-10.1             # <rocm-core-path> = /opt/rocm/core-10.1

   .. tab-item:: pip

      Use within active python virtual environment:

      .. code-block:: bash

         ROCM_INSTALL_PATH=$(rocm-sdk path --root)         # <rocm-core-path> = rocm-sdk path of core installation

   .. tab-item:: Tarball

      .. code-block:: bash

         ROCM_INSTALL_PATH=<path>/therock-tarball/install  # <rocm-core-path> = <path> to default "therock-tarball" installation

   .. tab-item:: Runfile

      .. code-block:: bash

         ROCM_INSTALL_PATH=/opt/rocm/core-10.1             # <rocm-core-path> = default /opt/rocm/core-10.1 installation (no target=)
         ROCM_INSTALL_PATH=<path>/rocm/core-10.1           # <rocm-core-path> = target=<path>

Package manager installation
=============================

Use the following steps to install RVS using your distribution's package manager
on top of the ROCm Core SDK.

1. Register the RVS repository.

   .. tab-set::

      .. tab-item:: Ubuntu
         :sync: ubuntu

         .. tab-set::

            .. tab-item:: 26.04
               :sync: ubuntu-2604

               .. code-block:: bash

                  sudo mkdir --parents --mode=0755 /etc/apt/keyrings
                  wget https://stable.repo.amd.com/rocm/gpg/packages.gpg -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null
                  sudo tee /etc/apt/sources.list.d/amdrocm-rvs.sources << 'EOF'
                  X-Repo-Id: amdrocm-rvs
                  Types: deb
                  URIs: https://stable.repo.amd.com/rocm/extras/rvs/packages/ubuntu2604/
                  Suites: stable
                  Components: main
                  Architectures: amd64
                  Signed-By: /etc/apt/keyrings/amdrocm.gpg
                  Enabled: yes
                  EOF

                  sudo apt update

            .. tab-item:: 24.04
               :sync: ubuntu-2404

               .. code-block:: bash

                  sudo mkdir --parents --mode=0755 /etc/apt/keyrings
                  wget https://stable.repo.amd.com/rocm/gpg/packages.gpg -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null
                  sudo tee /etc/apt/sources.list.d/amdrocm-rvs.sources << 'EOF'
                  X-Repo-Id: amdrocm-rvs
                  Types: deb
                  URIs: https://stable.repo.amd.com/rocm/extras/rvs/packages/ubuntu2404/
                  Suites: stable
                  Components: main
                  Architectures: amd64
                  Signed-By: /etc/apt/keyrings/amdrocm.gpg
                  Enabled: yes
                  EOF

                  sudo apt update

            .. tab-item:: 22.04
               :sync: ubuntu-2204

               .. code-block:: bash

                  sudo mkdir --parents --mode=0755 /etc/apt/keyrings
                  wget https://stable.repo.amd.com/rocm/gpg/packages.gpg -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null
                  sudo tee /etc/apt/sources.list.d/amdrocm-rvs.sources << 'EOF'
                  X-Repo-Id: amdrocm-rvs
                  Types: deb
                  URIs: https://stable.repo.amd.com/rocm/extras/rvs/packages/ubuntu2204/
                  Suites: stable
                  Components: main
                  Architectures: amd64
                  Signed-By: /etc/apt/keyrings/amdrocm.gpg
                  Enabled: yes
                  EOF

                  sudo apt update

      .. tab-item:: Debian
         :sync: debian

         .. tab-set::

            .. tab-item:: 13
               :sync: debian-13

               .. code-block:: bash

                  sudo mkdir --parents --mode=0755 /etc/apt/keyrings
                  wget https://stable.repo.amd.com/rocm/gpg/packages.gpg -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null
                  sudo tee /etc/apt/sources.list.d/amdrocm-rvs.sources << 'EOF'
                  X-Repo-Id: amdrocm-rvs
                  Types: deb
                  URIs: https://stable.repo.amd.com/rocm/extras/rvs/packages/debian13/
                  Suites: stable
                  Components: main
                  Architectures: amd64
                  Signed-By: /etc/apt/keyrings/amdrocm.gpg
                  Enabled: yes
                  EOF

                  sudo apt update

            .. tab-item:: 12
               :sync: debian-12

               .. code-block:: bash

                  sudo mkdir --parents --mode=0755 /etc/apt/keyrings
                  wget https://stable.repo.amd.com/rocm/gpg/packages.gpg -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/amdrocm.gpg > /dev/null
                  sudo tee /etc/apt/sources.list.d/amdrocm-rvs.sources << 'EOF'
                  X-Repo-Id: amdrocm-rvs
                  Types: deb
                  URIs: https://stable.repo.amd.com/rocm/extras/rvs/packages/debian12/
                  Suites: stable
                  Components: main
                  Architectures: amd64
                  Signed-By: /etc/apt/keyrings/amdrocm.gpg
                  Enabled: yes
                  EOF

                  sudo apt update

      .. tab-item:: RHEL
         :sync: rhel

         .. tab-set::

            .. tab-item:: 10
               :sync: rhel-10

               .. code-block:: bash

                  sudo tee /etc/yum.repos.d/amdrocm-rvs.repo <<EOF
                  [amdrocm-rvs]
                  name=ROCm Validation Suite
                  baseurl=https://stable.repo.amd.com/rocm/extras/rvs/packages/rhel10/x86_64
                  enabled=1
                  gpgcheck=1
                  gpgkey=https://stable.repo.amd.com/rocm/gpg/packages.gpg
                  priority=50
                  EOF
                  sudo dnf clean all

            .. tab-item:: 9
               :sync: rhel-9

               .. code-block:: bash

                  sudo tee /etc/yum.repos.d/amdrocm-rvs.repo <<EOF
                  [amdrocm-rvs]
                  name=ROCm Validation Suite
                  baseurl=https://stable.repo.amd.com/rocm/extras/rvs/packages/rhel9/x86_64
                  enabled=1
                  gpgcheck=1
                  gpgkey=https://stable.repo.amd.com/rocm/gpg/packages.gpg
                  priority=50
                  EOF
                  sudo dnf clean all

            .. tab-item:: 8
               :sync: rhel-8

               .. code-block:: bash

                  sudo tee /etc/yum.repos.d/amdrocm-rvs.repo <<EOF
                  [amdrocm-rvs]
                  name=ROCm Validation Suite
                  baseurl=https://stable.repo.amd.com/rocm/extras/rvs/packages/rhel8/x86_64
                  enabled=1
                  gpgcheck=1
                  gpgkey=https://stable.repo.amd.com/rocm/gpg/packages.gpg
                  priority=50
                  EOF
                  sudo dnf clean all

2. Install the RVS package.

   .. tab-set::

      .. tab-item:: Ubuntu
         :sync: ubuntu

         .. code-block:: bash

            sudo apt install amdrocm10-rvs

      .. tab-item:: RHEL
         :sync: rhel

         .. code-block:: bash

            sudo dnf install amdrocm10-rvs

3. Complete the following post-installation steps.

   Use the following commands to update your shell configuration file
   (``~/.bashrc`` or ``~/.profile``) and add ROCm to your PATH.

   a. Set the ROCm installation path based on the ROCm installation method
      and ``<rocm-core-path>``:

      .. code-block:: bash

         ROCM_INSTALL_PATH=<rocm-core-path>  # ie. /opt/rocm/core-10.1

   b. Configure your environment.

      .. tab-set::

         .. tab-item:: System-wide

            .. code-block:: bash

               sudo tee /etc/profile.d/set-rvs-env.sh << EOF
               export EXTRAS_PATH=/opt/rocm/extras-10
               export ROCM_PATH=$ROCM_INSTALL_PATH
               export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH
               export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH
               EOF

               sudo chmod +x /etc/profile.d/set-rvs-env.sh
               source /etc/profile.d/set-rvs-env.sh

         .. tab-item:: User

            .. code-block:: bash

               tee --append ~/.bashrc << EOF
               # BEGIN RVS environment configuration
               export EXTRAS_PATH=/opt/rocm/extras-10
               export ROCM_PATH=$ROCM_INSTALL_PATH
               export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH
               export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH
               # END RVS environment configuration
               EOF

               source ~/.bashrc

4. Verify your installation.

   .. code-block:: bash

      rvs -g

.. note::
   The ROCm repositories must be set up before installing RVS. This repository
   setup is part of the ROCm Core SDK installation.

Package manager uninstalling
============================

1. Use your package manager to remove the installed packages.

   .. tab-set::

      .. tab-item:: Ubuntu
         :sync: ubuntu

         .. code-block:: bash

            sudo apt autoremove amdrocm10-rvs

      .. tab-item:: RHEL
         :sync: rhel

         .. code-block:: bash

            sudo dnf remove amdrocm10-rvs

2. Remove RVS repositories.

   .. tab-set::

      .. tab-item:: Ubuntu
         :sync: ubuntu

         .. tab-set::

            .. tab-item:: 26.04
               :sync: ubuntu-2604

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/apt/sources.list.d/amdrocm-rvs.sources

                  # Clear the cache and clean the system
                  sudo rm -rf /var/cache/apt/*
                  sudo apt clean all
                  sudo apt update

            .. tab-item:: 24.04
               :sync: ubuntu-2404

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/apt/sources.list.d/amdrocm-rvs.sources

                  # Clear the cache and clean the system
                  sudo rm -rf /var/cache/apt/*
                  sudo apt clean all
                  sudo apt update

            .. tab-item:: 22.04
               :sync: ubuntu-2204

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/apt/sources.list.d/amdrocm-rvs.sources

                  # Clear the cache and clean the system
                  sudo rm -rf /var/cache/apt/*
                  sudo apt clean all
                  sudo apt update

      .. tab-item:: Debian
         :sync: debian

         .. tab-set::

            .. tab-item:: 13
               :sync: debian-13

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/apt/sources.list.d/amdrocm-rvs.sources

                  # Clear the cache and clean the system
                  sudo rm -rf /var/cache/apt/*
                  sudo apt clean all
                  sudo apt update

            .. tab-item:: 12
               :sync: debian-12

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/apt/sources.list.d/amdrocm-rvs.sources

                  # Clear the cache and clean the system
                  sudo rm -rf /var/cache/apt/*
                  sudo apt clean all
                  sudo apt update

      .. tab-item:: RHEL
         :sync: rhel

         .. tab-set::

            .. tab-item:: 10
               :sync: rhel-10

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/yum.repos.d/amdrocm-rvs.repo

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

            .. tab-item:: 9
               :sync: rhel-9

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/yum.repos.d/amdrocm-rvs.repo

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

            .. tab-item:: 8
               :sync: rhel-8

               .. code-block:: bash

                  # Remove RVS repositories
                  sudo rm /etc/yum.repos.d/amdrocm-rvs.repo

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

3. Remove your RVS environment configuration from your system.

   .. tab-set::

      .. tab-item:: System-wide

         If you opted for a system-wide setup during the installation
         process, remove the RVS environment variables.

         .. code-block:: bash

            sudo rm -f /etc/profile.d/set-rvs-env.sh

      .. tab-item:: User

         If you opted for a user-specific setup during the installation
         process, remove the RVS environment configuration block from
         your shell configuration file (``~/.bashrc`` or ``~/.profile``).

Tarball installation
====================

Use the following steps to install RVS using a tarball on top of the ROCm Core SDK.

1. Install system dependencies.

   .. tab-set::

      .. tab-item:: Ubuntu
         :sync: ubuntu

         .. code-block:: bash

            sudo apt install libpci3 libnuma1

      .. tab-item:: RHEL
         :sync: rhel

         .. code-block:: bash

            sudo dnf install pciutils-libs numactl-libs

2. Download the RVS tarball.

   .. code-block:: bash

      wget https://stable.repo.amd.com/rocm/extras/rvs/tarball/amdrocm10-rvs-1.6.131-844-Linux.tar.gz

   The tarball file may be verified against the following SHA256:

   .. code-block:: bash

      wget https://stable.repo.amd.com/rocm/extras/rvs/tarball/amdrocm10-rvs-1.6.131-844-Linux.tar.gz.sha256

3. Extract the tarball to the ROCm Extras location.

   RVS is part of the ROCm Extras set of tools that work with the ROCm Core SDK.
   The ROCm Extras location (``EXTRAS_INSTALL_PATH``) can be set to a custom
   location ``<extras-path>``, but is typically set based on the ROCm installation
   method used.

   .. code-block:: bash

      EXTRAS_INSTALL_PATH=<extras-path>  # ie. <extras-path> = path to ROCm extras for RVS extract

      sudo mkdir -p $EXTRAS_INSTALL_PATH
      sudo tar -xzf amdrocm10-rvs-1.6.131-844-Linux.tar.gz -C $EXTRAS_INSTALL_PATH

   **Recommended:** Set ``EXTRAS_INSTALL_PATH`` to a location within the root
   install directory for the ROCm Core SDK.

   For example, if you installed the ROCm Core SDK using your Linux
   distribution's package manager:

   .. code-block:: bash

      sudo mkdir -p /opt/rocm/extras-10
      sudo tar -xzf amdrocm10-rvs-1.6.131-844-Linux.tar.gz -C /opt/rocm/extras-10

4. Complete the following post-installation steps.

   Use the following commands to update your shell configuration file
   (``~/.bashrc`` or ``~/.profile``) and add Extras and ROCm to your PATH.

   a. Set the ROCm installation path based on the ROCm installation method
      and ``<rocm-core-path>``:

      .. code-block:: bash

         ROCM_INSTALL_PATH=<rocm-core-path>  # ie. /opt/rocm/core-10.1

   b. Configure your environment.

      .. tab-set::

         .. tab-item:: System-wide

            .. code-block:: bash

               sudo tee /etc/profile.d/set-rvs-env.sh << EOF
               export EXTRAS_PATH=$EXTRAS_INSTALL_PATH
               export ROCM_PATH=$ROCM_INSTALL_PATH
               export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH
               export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH
               EOF

               sudo chmod +x /etc/profile.d/set-rvs-env.sh
               source /etc/profile.d/set-rvs-env.sh

         .. tab-item:: User

            .. code-block:: bash

               tee --append ~/.bashrc << EOF
               # BEGIN RVS environment configuration
               export EXTRAS_PATH=$EXTRAS_INSTALL_PATH
               export ROCM_PATH=$ROCM_INSTALL_PATH
               export PATH=\$EXTRAS_PATH/bin:\$ROCM_PATH/bin:\$PATH
               export LD_LIBRARY_PATH=\$EXTRAS_PATH/lib:\$ROCM_PATH/lib:\$ROCM_PATH/lib/llvm/lib:\$LD_LIBRARY_PATH
               # END RVS environment configuration
               EOF

               source ~/.bashrc

5. Verify your installation.

   .. code-block:: bash

      rvs -g

Tarball uninstalling
====================

1. Remove the installation directory.

   .. important::
      The following command assumes you're working with the
      ``EXTRAS_INSTALL_PATH`` directory set to ``/opt/rocm/extras-10``. If you
      chose a different directory name when installing RVS, adjust the command
      accordingly.

   .. code-block:: bash

      sudo rm -rf /opt/rocm/extras-10

2. Remove the RVS environment configuration from your system.

   .. tab-set::

      .. tab-item:: System-wide

         If you opted for a system-wide setup during the installation process,
         remove the RVS environment variables.

         .. code-block:: bash

            sudo rm -f /etc/profile.d/set-rvs-env.sh

      .. tab-item:: User

         If you opted for a user-specific setup during the installation
         process, remove the RVS environment configuration block from your
         shell configuration file (``~/.bashrc`` or ``~/.profile``).