Post-installation instructions — ROCm installation (Linux) (original) (raw)
Contents
Post-installation instructions#
2025-05-21
4 min read time
Applies to Linux
After installing ROCm, follow these steps to finalize and validate the installation.
Environment Configuration#
1. Configure ROCm shared objects#
Configure the system linker by specifying where to find the shared objects (.so
files) for ROCm applications.
sudo tee --append /etc/ld.so.conf.d/rocm.conf <<EOF /opt/rocm/lib /opt/rocm/lib64 EOF sudo ldconfig
2. Configure ROCm PATH
#
Configure the path to the ROCm binary using one of the following Linux utilities or manually update the PATH
variable. The ROCm installation process adds the ROCm executables to these systems, provided they are installed on the system.
Option A: update-alternatives
The update-alternatives
utility is available on most Linux distributions. It helps manage multiple versions of a command or program. For more information about update-alternatives
, seeLinux man.
To use update-alternatives
, follow these steps:
- Display a list of all ROCm versions available:
sudo update-alternatives --display rocm - If multiple ROCm versions are installed, switch between them using this command and selecting the ROCm version:
sudo update-alternatives --config rocm
Option B: environment-modules
The environment-modules
tool simplifies shell initialization. It lets you modify your session environment using module files. For more information, seeEnvironment Modules.
Note
The environment-modules
package should be installed on the system before ROCm can be configured using modules. For more information, see prerequisites.
To use environment-modules
, follow these instructions:
- Enable
environment-modules
:
source /etc/profile.d/modules.sh - Display a list of all available modules (including ROCm modules):
- Display a list of all currently loaded modules:
- If multiple ROCm versions are installed, and no other ROCm modules are currently loaded, set ROCm by version:
- If multiple ROCm versions are installed with a current ROCm module in use, switch to another ROCm version as follows:
Note
If modules are used for ROCm, any update-alternatives
ROCm setting will be overwritten for the terminal session.
Option C: PATH
If update-alternatives
or environment-modules
are not available on the system, configure the ROCm path by setting the PATH
variable to /opt/rocm-<version>/bin
.
export PATH=$PATH:/opt/rocm-6.4.1/bin
3. Configure LD_LIBRARY_PATH
#
Important
This step is required for version-specific or multi-version installations.
export LD_LIBRARY_PATH=/opt/rocm-6.4.1/lib
Install verification#
Once ROCm has been configured, validate the installation.
1. Verify the package installation#
Use the package manager to validate the list of ROCm component packages installed on the system. If package installation was successful, the list will contain rocm*
and hip*
packages currently installed on the system.
Ubuntu
Debian
RHEL
OL
SLES
zypper search --installed-only
AZL
2. Verify the ROCm installation#
Use the following ROCm tools to verify that installation was successful:
Both rocminfo
and clinfo
should output attributes for the ROCm system configuration if installation was successful. For additional testing of ROCm functionality, try rocm-examples.
Troubleshooting#
- What if environment-modules is not installed before installing ROCm?
You can still installenvironment-modules
package after installing ROCm. However, no ROCm modules will be listed for themodule avail
command. As an alternative to the standard method of loading the ROCm modules, you can load each version-specific module directly from the/opt/rocm-<version>
directory:
module load /opt/rocm-6.4.1/lib/rocmmod - Will the ROCm path configuration persist once I set it?
- If you are using update-alternatives to configure ROCm, then yes, the currently set configuration will persist even after a system reboot.
- If you are using environment-modules to configure ROCm, then no, the current set configuration will only last for the current terminal session.