mirror of
https://github.com/ROCm/ROCm.git
synced 2026-01-10 07:08:08 -05:00
Port installation guide (#2018)
This commit is contained in:
committed by
GitHub
parent
64a243fc29
commit
1ec7e1c933
@@ -162,6 +162,7 @@ subtrees:
|
||||
- entries:
|
||||
- file: understand/installing_linux/prerequisites
|
||||
- file: understand/installing_linux/package_manager_integration
|
||||
- file: how_to/manage_install/install_linux
|
||||
- title: Compiler Disambiguation
|
||||
file: understand/compiler_disambiguation
|
||||
- file: understand/isv_deployment_win
|
||||
|
||||
BIN
docs/data/understand/installing_linux/image.002.png
Normal file
BIN
docs/data/understand/installing_linux/image.002.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 537 KiB |
BIN
docs/data/understand/installing_linux/image.003.png
Normal file
BIN
docs/data/understand/installing_linux/image.003.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 292 KiB |
BIN
docs/data/understand/installing_linux/image.004.png
Normal file
BIN
docs/data/understand/installing_linux/image.004.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
808
docs/how_to/manage_install/install_linux.md
Normal file
808
docs/how_to/manage_install/install_linux.md
Normal file
@@ -0,0 +1,808 @@
|
||||
# Installation
|
||||
|
||||
Installing can be done in one of two ways, depending on your preference:
|
||||
|
||||
- Using an installer script
|
||||
- Through your system's package manager
|
||||
|
||||
```{attention}
|
||||
For information on installing ROCm on devices with NVIDIA GPUs, refer to the HIP
|
||||
Installation Guide.
|
||||
```
|
||||
|
||||
## Installer Script Method
|
||||
|
||||
The installer script method automates the installation process for the AMDGPU
|
||||
and ROCm stack. The installer script handles the complete installation process
|
||||
for ROCm, including setting up the repository, cleaning the system, updating,
|
||||
and installing the desired drivers and meta-packages. With this approach, the
|
||||
system has more control over the ROCm installation process. Thus, those who are
|
||||
less familiar with the Linux standard commands can choose this method for ROCm
|
||||
installation.
|
||||
|
||||
For AMDGPU and ROCm installation using the installer script method on Linux
|
||||
distribution, follow these steps:
|
||||
|
||||
1. **Meet prerequisites** – Ensure the Prerequisites are met before downloading
|
||||
and installing the installer using the installer script method.
|
||||
|
||||
2. **Download and install the installer script** – Ensure you download and
|
||||
install the installer script from the recommended URL.
|
||||
|
||||
```{tip}
|
||||
The installer package is updated periodically to resolve known issues and add
|
||||
new features. The links for each Linux distribution always point to the latest
|
||||
available build.
|
||||
```
|
||||
|
||||
3. **Use the installer script on Linux distributions** – Ensure you execute the
|
||||
script for installing use cases.
|
||||
|
||||
### Download and Install the Installer Script
|
||||
|
||||
::::::{tab-set}
|
||||
:::::{tab-item} Ubuntu
|
||||
:sync: ubuntu
|
||||
|
||||
::::{rubric} To download the amdgpu-install script on the system, use the following commands.
|
||||
::::
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} Ubuntu 20.04
|
||||
:sync: ubuntu-20.04
|
||||
|
||||
```shell
|
||||
sudo apt update
|
||||
wget https://repo.radeon.com/amdgpu-install/5.4.3/ubuntu/focal/amdgpu-install_5.4.50403-1_all.deb
|
||||
sudo apt install ./amdgpu-install_5.4.50403-1_all.deb
|
||||
```
|
||||
|
||||
:::
|
||||
:::{tab-item} Ubuntu 22.04
|
||||
:sync: ubuntu-22.04
|
||||
|
||||
```shell
|
||||
sudo apt update
|
||||
wget https://repo.radeon.com/amdgpu-install/5.4.3/ubuntu/jammy/amdgpu-install_5.4.50403-1_all.deb
|
||||
sudo apt install ./amdgpu-install_5.4.50403-1_all.deb
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
:::::
|
||||
:::::{tab-item} Red Hat Enterprise Linux
|
||||
:sync: RHEL
|
||||
|
||||
::::{rubric} To download the amdgpu-install script on the system, use the following commands.
|
||||
::::
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} RHEL 8.6
|
||||
:sync: RHEL-8.6
|
||||
|
||||
```shell
|
||||
sudo yum install https://repo.radeon.com/amdgpu-install/5.4.3/rhel/8.6/amdgpu-install-5.4.50403-1.el8.noarch.rpm
|
||||
```
|
||||
|
||||
:::
|
||||
:::{tab-item} RHEL 8.7
|
||||
:sync: RHEL-8.7
|
||||
|
||||
```shell
|
||||
sudo yum install https://repo.radeon.com/amdgpu-install/5.4.3/rhel/8.7/amdgpu-install-5.4.50403-1.el8.noarch.rpm
|
||||
```
|
||||
|
||||
:::
|
||||
:::{tab-item} RHEL 9.1
|
||||
:sync: RHEL-9.1
|
||||
|
||||
```shell
|
||||
sudo yum install https://repo.radeon.com/amdgpu-install/5.4.3/rhel/9.1/amdgpu-install-5.4.50403-1.el9.noarch.rpm
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
:::::
|
||||
:::::{tab-item} SUSE Linux Enterprise Server 15
|
||||
:sync: SLES15
|
||||
|
||||
::::{rubric} To download the amdgpu-install script on the system, use the following commands.
|
||||
::::
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} Service Pack 4
|
||||
:sync: SLES15-SP4
|
||||
|
||||
```shell
|
||||
sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/5.4.3/sle/15.4/amdgpu-install-5.4.50403-1.noarch.rpm
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
:::::
|
||||
::::::
|
||||
|
||||
### Using the Installer Script for Single-version ROCm Installation
|
||||
|
||||
To install use cases specific to your requirements, use the installer
|
||||
`amdgpu-install` as follows:
|
||||
|
||||
- To install a single use case:
|
||||
|
||||
```shell
|
||||
sudo amdgpu-install --usecase=rocm
|
||||
```
|
||||
|
||||
- To install kernel-mode driver:
|
||||
|
||||
```shell
|
||||
sudo amdgpu-install --usecase=dkms
|
||||
```
|
||||
|
||||
- To install multiple use cases:
|
||||
|
||||
```shell
|
||||
sudo amdgpu-install --usecase=hiplibsdk,rocm
|
||||
```
|
||||
|
||||
- To display a list of available use cases:
|
||||
|
||||
```shell
|
||||
sudo amdgpu-install --list-usecase
|
||||
```
|
||||
|
||||
Following is a sample of output listed by the command above:
|
||||
|
||||
```{note}
|
||||
The list in this section represents only a sample of available use cases for ROCm:
|
||||
```
|
||||
|
||||
```none
|
||||
If --usecase option is not present, the default selection is "graphics,opencl,hip"
|
||||
|
||||
Available use cases:
|
||||
rocm(for users and developers requiring full ROCm stack)
|
||||
- OpenCL (ROCr/KFD based) runtime
|
||||
- HIP runtimes
|
||||
- Machine learning framework
|
||||
- All ROCm libraries and applications
|
||||
- ROCm Compiler and device libraries
|
||||
- ROCr runtime and thunk
|
||||
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
|
||||
```
|
||||
|
||||
```{tip}
|
||||
Adding `-y` as a parameter to `amdgpu-install` skips user prompts (for
|
||||
automation). Example: `amdgpu-install -y --usecase=rocm`
|
||||
```
|
||||
|
||||
### Using Installer Script in Docker
|
||||
|
||||
When the installation is initiated in Docker, the installer tries to install the
|
||||
use case along with the kernel-mode driver. However, you cannot install the
|
||||
kernel-mode driver in a Docker container. To skip the installation of the
|
||||
kernel-mode driver, proceed with the --no-dkms option, as shown below:
|
||||
|
||||
```shell
|
||||
sudo amdgpu-install --usecase=rocm --no-dkms
|
||||
```
|
||||
|
||||
### Using the Installer Script for Multiversion ROCm Installation
|
||||
|
||||
The multiversion ROCm installation requires you to download and install the
|
||||
latest ROCm release installer from the list of ROCm releases you want to install
|
||||
simultaneously on your system.
|
||||
|
||||
**Example:** If you want to install ROCm releases 4.5.0, 4.5.1, and 5.4.3
|
||||
simultaneously, you are required to download the installer from the latest ROCm
|
||||
release v5.4.3.
|
||||
|
||||
To download and install the installer, refer to the [Download and Install the
|
||||
Installer Script](#download-and-install-the-installer-script) section.
|
||||
|
||||
```{attention}
|
||||
If the existing ROCm release contains non-versioned ROCm packages, uninstall
|
||||
those packages before proceeding with the multiversion installation to avoid
|
||||
conflicts.
|
||||
```
|
||||
|
||||
#### Add Required ROCm Repositories
|
||||
|
||||
Add the required repositories using the following steps:
|
||||
|
||||
```{important}
|
||||
Add the AMDGPU and 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.
|
||||
```
|
||||
|
||||
::::::{tab-set}
|
||||
:::::{tab-item} Ubuntu
|
||||
:sync: ubuntu
|
||||
|
||||
Add the ROCm repositories for the releases you want to install by choosing
|
||||
`<Release-1 specific rocm baseurl>` and `<Release-2 specific rocm baseurl>` from
|
||||
the given [Base URLs for AMDGPU and ROCm Stack Repositories]().
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} Ubuntu 20.04
|
||||
:sync: ubuntu-20.04
|
||||
|
||||
```shell
|
||||
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] <Release-1 specific rocm baseurl> focal main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] <Release-2 specific rocm baseurl> focal main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
:::
|
||||
:::{tab-item} Ubuntu 22.04
|
||||
:sync: ubuntu-22.04
|
||||
|
||||
```shell
|
||||
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] <Release-1 specific rocm baseurl> jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] <Release-2 specific rocm baseurl> jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
:::::
|
||||
:::::{tab-item} Red Hat Enterprise Linux
|
||||
:sync: RHEL
|
||||
|
||||
1. Create a `/etc/yum.repos.d/rocm.repo` file with the following content:
|
||||
|
||||
Provide the `<Release-1 specific rocm baseurl>` and
|
||||
`<Release-2 specific rocm baseurl>` baseurl from the given
|
||||
[Base URLs for AMDGPU and ROCm Stack Repositories]().
|
||||
|
||||
```shell
|
||||
[ROCm-1]
|
||||
Name=ROCm<Release version 1>
|
||||
baseurl=<Release-1 specific rocm baseurl>
|
||||
enabled=1
|
||||
priority=50
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
[ROCm-2]
|
||||
Name=ROCm<Release version 2>
|
||||
baseurl=<Release-2 specific rocm baseurl>
|
||||
enabled=1
|
||||
priority=50
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
```
|
||||
|
||||
2. To clean the cached files from enabled repositories, execute the command
|
||||
below:
|
||||
|
||||
```shell
|
||||
sudo yum clean all
|
||||
```
|
||||
|
||||
:::::
|
||||
:::::{tab-item} SUSE Linux Enterprise Server 15
|
||||
:sync: SLES15
|
||||
|
||||
1. Create a `/etc/zypp/repos.d/amdgpu.repo` file with the following content:
|
||||
|
||||
Select the `<Release-1 specific rocm baseurl>` and
|
||||
`<Release-2 specific rocm baseurl>` from
|
||||
[Base URLs for AMDGPU and ROCm Stack Repositories]().
|
||||
|
||||
```shell
|
||||
[rocm]
|
||||
name=rocm<Release version 1>
|
||||
baseurl=<Release-1 specific rocm baseurl>
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
[rocm]
|
||||
name=rocm<Release version 2>
|
||||
baseurl=<Release-2 specific rocm baseurl>
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
```
|
||||
|
||||
2. To update the added repositories, use the following command:
|
||||
|
||||
```shell
|
||||
sudo zypper ref
|
||||
```
|
||||
|
||||
:::::
|
||||
::::::
|
||||
|
||||
#### Use the Installer to Install Multiversion ROCm Meta-packages
|
||||
|
||||
Use the installer script as given below:
|
||||
|
||||
```none
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=<release-number-1>
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=<release-number-2>
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=<release-number-3>
|
||||
```
|
||||
|
||||
```{tip}
|
||||
If the kernel-mode driver is already present on the system and you do not want
|
||||
to upgrade it, use the `--no-dkms` option to skip the installation of the
|
||||
kernel-mode driver, as shown in the following samples:
|
||||
```
|
||||
|
||||
```none
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=4.5.0 --no-dkms
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=5.4.3 --no-dkms
|
||||
```
|
||||
|
||||
Following are examples of ROCm multiversion installation. The kernel-mode
|
||||
driver, associated with the ROCm release v5.4.3, will be installed as its latest
|
||||
release in the list.
|
||||
|
||||
```none
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=4.5.0
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=4.5.2
|
||||
sudo amdgpu-install --usecase=rocm --rocmrelease=5.4.3
|
||||
```
|
||||
|
||||
## Package Manager Method
|
||||
|
||||
The package manager method involves a manual setup of the repository, which
|
||||
includes setting up the repository, updating, and installing/uninstalling
|
||||
meta-packages. This involves using standard commands such as yum, apt, and
|
||||
others respective to the Linux distribution.
|
||||
|
||||
The functions of a package manager installation system are:
|
||||
|
||||
- Grouping packages based on function
|
||||
- Extracting package archives
|
||||
- Ensuring a package is installed with all necessary packages and dependencies
|
||||
are managed
|
||||
- From a remote repository, looking up, downloading, installing, or updating
|
||||
existing packages
|
||||
- Ensuring the authenticity and integrity of the package
|
||||
|
||||
### Installing ROCm on Linux Distributions
|
||||
|
||||
For a fresh ROCm installation using the package manager method on a Linux
|
||||
distribution, follow the steps below:
|
||||
|
||||
1. **Meet prerequisites** – Ensure the Prerequisites are met before the ROCm
|
||||
installation.
|
||||
|
||||
2. **Install kernel headers and development packages** – Ensure kernel headers
|
||||
and development packages are installed on the system.
|
||||
|
||||
3. **Select the base URLs for AMDGPU and ROCm stack repository** – Ensure the
|
||||
base URLs for AMDGPU and ROCm stack repositories are selected.
|
||||
|
||||
4. **Add the AMDGPU stack repository** – Ensure the AMDGPU stack repository is
|
||||
added.
|
||||
|
||||
5. **Install the kernel-mode driver and reboot the system** – Ensure the
|
||||
kernel-mode driver is installed and the system is rebooted.
|
||||
|
||||
6. **Add ROCm stack repository** – Ensure the ROCm stack repository is added.
|
||||
|
||||
7. **Install single-version or multiversion ROCm meta-packages** – Install the
|
||||
desired meta-packages.
|
||||
|
||||
8. **Verify installation for the applicable distributions** – Verify if the
|
||||
installation is successful.
|
||||
|
||||
```{important}
|
||||
You cannot install a kernel-mode driver in a Docker container. Refer to the
|
||||
sections below for specific commands to install the AMDGPU and ROCm stack on
|
||||
various Linux distributions.
|
||||
```
|
||||
|
||||
#### Understanding the Release-specific AMDGPU and ROCm Stack Repositories on Linux Distributions
|
||||
|
||||
The release-specific repositories consist of packages from a specific release of
|
||||
the AMDGPU stack and ROCm stack. The repositories are not updated for the latest
|
||||
packages with subsequent releases. When a new ROCm release is available, the new
|
||||
repository, specific to that release, is added. You can select a specific
|
||||
release to install, update the previously installed single version to the later
|
||||
available release, or add the latest version of ROCm along with the currently
|
||||
installed version by using the multiversion ROCm packages.
|
||||
|
||||
```{note}
|
||||
Users installing multiple versions of the ROCm stack must use the
|
||||
release-specific base URL.
|
||||
```
|
||||
|
||||
#### Using the Package Manager
|
||||
|
||||
::::::{tab-set}
|
||||
:::::{tab-item} Ubuntu
|
||||
:sync: ubuntu
|
||||
|
||||
::::{rubric} Installation of Kernel Headers and Development Packages
|
||||
::::
|
||||
|
||||
The following instructions to install kernel headers and development packages
|
||||
apply to all versions and kernels of Ubuntu. The ROCm installation requires you
|
||||
to install the Linux-headers and Linux-modules-extra package with the correct
|
||||
version corresponding to the kernel's version.
|
||||
|
||||
**Example:** If the system is running the Linux kernel version
|
||||
`5.15.0-41-generic`, you must install the identical versions of Linux-headers
|
||||
and development packages. Refer to the [Kernel Information]() section to check
|
||||
the system's kernel version.
|
||||
|
||||
To check the `kernel-headers` and `linux-modules-extra` package versions,
|
||||
follow these steps:
|
||||
|
||||
1. For the Ubuntu/Debian environment, execute the following command to verify
|
||||
the kernel headers and development packages are installed with the respective
|
||||
versions:
|
||||
|
||||
```shell
|
||||
sudo dpkg -l | grep linux-headers
|
||||
```
|
||||
|
||||
The command indicates if there are Linux headers installed as shown below:
|
||||
|
||||
```none
|
||||
ii linux-headers-5.15.0-41-generic 5.15.0-41.44~20.04.1 amd64 Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
|
||||
```
|
||||
|
||||
2. Execute the following command to check whether the development packages are
|
||||
installed:
|
||||
|
||||
```shell
|
||||
sudo dpkg -l | grep linux-modules-extra
|
||||
```
|
||||
|
||||
The command mentioned above lists the installed `linux-modules-extra`
|
||||
packages like the output below:
|
||||
|
||||
```none
|
||||
ii linux-modules-extra-5.15.0-41-generic 5.15.0-41.44~20.04.1 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
|
||||
```
|
||||
|
||||
3. If the supported version installation of Linux headers and development
|
||||
packages are not installed on the system, execute the following command to
|
||||
install the packages:
|
||||
|
||||
```shell
|
||||
sudo apt install linux-headers-`uname -r` linux-modules-extra-`uname -r`
|
||||
```
|
||||
|
||||
::::{rubric} Adding the AMDGPU and ROCm Stack Repositories
|
||||
::::
|
||||
|
||||
1. Add GPG Key for AMDGPU and ROCm Stack
|
||||
|
||||
Add the GPG key for AMDGPU and ROCm repositories. For Debian-based systems
|
||||
like Ubuntu, configure the Debian ROCm repository as follows:
|
||||
|
||||
```shell
|
||||
curl -fsSL https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-keyring.gpg
|
||||
```
|
||||
|
||||
```{note}
|
||||
The gpg key may change; ensure it is updated when installing a new release. If
|
||||
the key signature verification fails while updating, re-add the key from the
|
||||
ROCm to the apt repository as mentioned above. The current rocm.gpg.key is not
|
||||
available in a standard key ring distribution but has the following sha1sum
|
||||
hash: `73f5d8100de6048aa38a8b84cd9a87f05177d208 rocm.gpg.key`
|
||||
```
|
||||
|
||||
2. Add the AMDGPU Stack Repository and Install the Kernel-mode Driver
|
||||
|
||||
```{attention}
|
||||
If you have a version of the kernel-mode driver installed, you may skip this
|
||||
section.
|
||||
```
|
||||
|
||||
To add the AMDGPU stack repository, follow these steps:
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} Ubuntu 20.04
|
||||
:sync: ubuntu-20.04
|
||||
|
||||
```shell
|
||||
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/amdgpu/5.4.3/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/amdgpu.list
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
:::
|
||||
:::{tab-item} Ubuntu 22.04
|
||||
:sync: ubuntu-22.04
|
||||
|
||||
```shell
|
||||
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/amdgpu/5.4.3/ubuntu jammy main' | sudo tee /etc/apt/sources.list.d/amdgpu.list
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
|
||||
Install the kernel mode driver and reboot the system using the following
|
||||
commands:
|
||||
|
||||
```shell
|
||||
sudo apt install amdgpu-dkms
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
3. Add the ROCm Stack Repository and Install Meta-packages
|
||||
|
||||
To add the ROCm repository, use the following steps:
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} Ubuntu 20.04
|
||||
:sync: ubuntu-20.04
|
||||
|
||||
```shell
|
||||
for ver in 5.0.2 5.1.4 5.2.5 5.3.3 5.4.3; do
|
||||
echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/rocm/apt/$ver focal main" | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||
done
|
||||
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
:::
|
||||
:::{tab-item} Ubuntu 22.04
|
||||
:sync: ubuntu-22.04
|
||||
|
||||
```shell
|
||||
for ver in 5.0.2 5.1.4 5.2.5 5.3.3 5.4.3; do
|
||||
echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/rocm/apt/$ver jammy main" | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||
done
|
||||
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
|
||||
Install packages of your choice in a single-version ROCm install or
|
||||
in a multi-version ROCm install fashion. For more information on what
|
||||
single/multi-version installations are, refer to {ref}`installation-types`.
|
||||
For a comprehensive list of meta-packages, refer to
|
||||
{ref}`meta-package-desc`.
|
||||
|
||||
- Sample Single-version installation
|
||||
|
||||
```shell
|
||||
sudo apt install rocm-hip-sdk
|
||||
```
|
||||
|
||||
- Sample Multi-version installation
|
||||
|
||||
```{important}
|
||||
If the existing ROCm release contains non-versioned ROCm packages, you must
|
||||
uninstall those packages before proceeding to the multiversion installation
|
||||
to avoid conflicts.
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo apt install rocm-hip-sdk5.4.3 rocm-hip-sdk5.2.5
|
||||
```
|
||||
|
||||
:::::
|
||||
:::::{tab-item} Red Hat Enterprise Linux
|
||||
:sync: RHEL
|
||||
|
||||
::::{rubric} Installation of Kernel Headers and Development Packages
|
||||
::::
|
||||
|
||||
The ROCm installation requires that you install the kernel headers and
|
||||
`linux-modules-extra` package with the correct version corresponding to the
|
||||
kernel's version.
|
||||
|
||||
**Example:** If the system is running Linux kernel version
|
||||
`3.10.0-1160.el7.x86_64`, you must install the identical versions of kernel
|
||||
headers and development packages. To check the kernel version on your system,
|
||||
refer to the [Kernel Information]() section.
|
||||
|
||||
To check the kernel headers and `linux-modules-extra` package versions,
|
||||
follow these steps:
|
||||
|
||||
1. To verify you have the supported version of the installed kernel headers,
|
||||
type the following on the command line:
|
||||
|
||||
```shell
|
||||
sudo yum list installed kernel-headers
|
||||
```
|
||||
|
||||
The command mentioned above displays the list of kernel headers versions
|
||||
currently present on your system. Verify if the listed kernel headers have
|
||||
the same versions as the kernel.
|
||||
|
||||
2. The following command lists the development packages on your system. Verify
|
||||
if the listed development package's version number matches the kernel version
|
||||
number:
|
||||
|
||||
```shell
|
||||
sudo yum list installed kernel-devel
|
||||
```
|
||||
|
||||
3. If the supported version installation of kernel headers and development
|
||||
packages does not exist on the system, execute the command below to install:
|
||||
|
||||
```shell
|
||||
sudo yum install kernel-headers-`uname -r` kernel-devel-`uname -r`
|
||||
```
|
||||
|
||||
::::{rubric} Adding the AMDGPU and ROCm Stack Repositories
|
||||
::::
|
||||
|
||||
1. Add the AMDGPU Stack Repository and Install the Kernel-mode Driver
|
||||
|
||||
```{attention}
|
||||
If you have a version of the kernel-mode driver installed, you may skip this
|
||||
section.
|
||||
```
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} RHEL 8.6
|
||||
:sync: RHEL-8.6
|
||||
|
||||
```shell
|
||||
sudo tee --append /etc/yum.repos.d/amdgpu.repo <<EOF
|
||||
[amdgpu]
|
||||
Name=amdgpu
|
||||
baseurl=https://repo.radeon.com/amdgpu/5.4.3/rhel/8.6/main/x86_64/
|
||||
enabled=1
|
||||
priority=50
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
EOF
|
||||
sudo yum clean all
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} RHEL 8.7
|
||||
:sync: RHEL-8.7
|
||||
|
||||
```shell
|
||||
sudo tee --append /etc/yum.repos.d/amdgpu.repo <<EOF
|
||||
[amdgpu]
|
||||
Name=amdgpu
|
||||
baseurl=https://repo.radeon.com/amdgpu/5.4.3/rhel/8.7/main/x86_64/
|
||||
enabled=1
|
||||
priority=50
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
EOF
|
||||
sudo yum clean all
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} RHEL 9.1
|
||||
:sync: RHEL-9.1
|
||||
|
||||
```shell
|
||||
sudo tee --append /etc/yum.repos.d/amdgpu.repo <<EOF
|
||||
[amdgpu]
|
||||
Name=amdgpu
|
||||
baseurl=https://repo.radeon.com/amdgpu/5.4.3/rhel/9.2/main/x86_64/
|
||||
enabled=1
|
||||
priority=50
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
EOF
|
||||
sudo yum clean all
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
|
||||
Install the kernel mode driver and reboot the system using the following
|
||||
commands:
|
||||
|
||||
```shell
|
||||
sudo yum install amdgpu-dkms
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
2. Add the ROCm Stack Repository and Install Meta-packages
|
||||
|
||||
To add the ROCm repository, use the following steps:
|
||||
|
||||
```shell
|
||||
for ver in 5.0.2 5.1.4 5.2.5 5.3.3 5.4.3; do
|
||||
sudo tee --append /etc/yum.repos.d/rocm.repo <<EOF
|
||||
[ROCm-$ver]
|
||||
Name=ROCm$ver
|
||||
baseurl=https://repo.radeon.com/rocm/$ver/main
|
||||
enabled=1
|
||||
priority=50
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
|
||||
EOF
|
||||
done
|
||||
sudo yum clean all
|
||||
```
|
||||
|
||||
Install packages of your choice in a single-version ROCm install or
|
||||
in a multi-version ROCm install fashion. For more information on what
|
||||
single/multi-version installations are, refer to {ref}`installation-types`.
|
||||
For a comprehensive list of meta-packages, refer to
|
||||
{ref}`meta-package-desc`.
|
||||
|
||||
- Sample Single-version installation
|
||||
|
||||
```shell
|
||||
sudo yum install rocm-hip-sdk
|
||||
```
|
||||
|
||||
- Sample Multi-version installation
|
||||
|
||||
```{important}
|
||||
If the existing ROCm release contains non-versioned ROCm packages, you must
|
||||
uninstall those packages before proceeding to the multiversion installation
|
||||
to avoid conflicts.
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo yum install rocm-hip-sdk5.4.3 rocm-hip-sdk5.2.5
|
||||
```
|
||||
|
||||
:::::
|
||||
:::::{tab-item} SUSE Linux Enterprise Server 15
|
||||
:sync: SLES15
|
||||
|
||||
::::{rubric} Installation of Kernel Headers and Development Packages
|
||||
::::
|
||||
|
||||
ROCm installation requires you to install `linux-headers` and
|
||||
`linux-modules-extra` package with the correct version corresponding to the
|
||||
kernel's version.
|
||||
|
||||
**Example:** If the system is running the Linux kernel version
|
||||
`5.3.18-57_11.0.18`, you must install the same versions of linux-headers and
|
||||
development packages. Refer to the [Kernel Information]() section to check
|
||||
the system's kernel version.
|
||||
|
||||
To check the `kernel-headers` and `linux-modules-extra` package versions, follow
|
||||
these steps:
|
||||
|
||||
1. Ensure that the correct version of the latest `kernel-default-devel` and
|
||||
`kernel-default` packages are installed. The following command lists the
|
||||
installed kernel-default-devel and kernel-default package:
|
||||
|
||||
```shell
|
||||
sudo zypper info kernel-default-devel or kernel-default
|
||||
```
|
||||
|
||||
```{note}
|
||||
This next step is only required if you find from the above command that the
|
||||
`kernel-default-devel` and `kernel-default` versions of the package,
|
||||
corresponding to the kernel release version, do not exist on your system.
|
||||
```
|
||||
|
||||
2. If the required version of packages does not exist on the system, install
|
||||
with the command below:
|
||||
|
||||
```shell
|
||||
sudo zypper install kernel-default-devel or kernel-default
|
||||
```
|
||||
|
||||
:::::
|
||||
::::::
|
||||
8
docs/how_to/manage_install_linux.md
Normal file
8
docs/how_to/manage_install_linux.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# How to Manage a ROCm Installation (Linux)
|
||||
|
||||
This section provides information about managing a ROCm installation. Detailed
|
||||
information on how to:
|
||||
|
||||
- Install
|
||||
- Upgrade
|
||||
- Uninstall
|
||||
@@ -1,4 +1,4 @@
|
||||
# Installation (Linux)
|
||||
# Installation Overview (Linux)
|
||||
|
||||
This chapter provides an overview of ROCm™ installation.
|
||||
|
||||
@@ -106,6 +106,8 @@ Some of the ROCm-specific use cases the installer supports are:
|
||||
|
||||
For more information, refer to the How to Install ROCm section in this guide.
|
||||
|
||||
(installation-types)=
|
||||
|
||||
## Installation types
|
||||
|
||||
This section discusses the single-version and multiversion installation of the
|
||||
|
||||
@@ -1 +1,118 @@
|
||||
# Package Manager Integration (Linux)
|
||||
|
||||
This section provides information about the required meta-packages for the
|
||||
following AMD ROCm programming models:
|
||||
|
||||
- Heterogeneous-Computing Interface for Portability (HIP)
|
||||
- OpenCL™
|
||||
- OpenMP™
|
||||
|
||||
## ROCm Package Naming Conventions
|
||||
|
||||
A meta-package is a grouping of related packages and dependencies used to
|
||||
support a specific use case.
|
||||
|
||||
**Example:** Running HIP applications
|
||||
|
||||
All meta-packages exist in both versioned and non-versioned forms.
|
||||
|
||||
- Non-versioned packages – For a single-version installation of the ROCm stack
|
||||
- Versioned packages – For multiversion installations of the ROCm stack
|
||||
|
||||
```{figure-md} package-naming
|
||||
|
||||
<img src="../../data/understand/installing_linux/image.002.png" alt="">
|
||||
|
||||
ROCm Release Package Naming
|
||||
```
|
||||
|
||||
{numref}`package-naming` demonstrates the single and multiversion ROCm packages' naming
|
||||
structure, including examples for various Linux distributions. See terms below:
|
||||
|
||||
_Module_ - It is the part of the package that represents the name of the ROCm
|
||||
component.
|
||||
|
||||
**Example:** The examples mentioned in the image represent the ROCm HIP module.
|
||||
|
||||
_Module version_ - It is the version of the library released in that package. It
|
||||
should increase with a newer release.
|
||||
|
||||
_Release version_ - It shows the ROCm release version when the package was
|
||||
released.
|
||||
|
||||
**Example:** 50400 points to the ROCm 5.4.0 release.
|
||||
|
||||
_Build id_ - It represents the jenkins build number for that release.
|
||||
|
||||
_Arch_ - It shows the architecture for which the package was created.
|
||||
|
||||
_Distro_ - It describes the distribution for which the package was created. It is
|
||||
valid only for rpm packages.
|
||||
|
||||
**Example:** el8 represents RHEL 8.x packages.
|
||||
|
||||
## Components of ROCm Programming Models
|
||||
|
||||
{numref}`meta-packages` demonstrates the high-level layered architecture of ROCm
|
||||
programming models and their meta-packages. All meta-packages are a combination
|
||||
of required packages and libraries.
|
||||
|
||||
**Example:**
|
||||
|
||||
- rocm-hip-runtime is used to deploy on supported machines to execute HIP
|
||||
applications.
|
||||
- rocm-hip-sdk contains runtime components to deploy and execute HIP
|
||||
applications.
|
||||
|
||||
```{figure-md} meta-packages
|
||||
|
||||
<img src="../../data/understand/installing_linux/image.003.png" alt="">
|
||||
|
||||
ROCm Meta Packages
|
||||
```
|
||||
|
||||
```{note}
|
||||
_rocm-llvm_ is not a meta-package but a single package that installs the ROCm
|
||||
clang compiler files.
|
||||
```
|
||||
|
||||
```{table} Meta-packages and Their Descriptions
|
||||
:name: meta-package-desc
|
||||
| **Meta-packages** | **Description** |
|
||||
|:--------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| **rocm-language-runtime** | installs the ROCm runtime |
|
||||
| **rocm-hip-runtime** | installs packages necessary to run an application written in HIP for the AMD platform |
|
||||
| **rocm-opencl-runtime** | installs packages required to run OpenCL-based applications on the AMD platform |
|
||||
| **rocm-hip-runtime-devel** | contains packages to develop an application on HIP or port it from CUDA |
|
||||
| **rocm-opencl-sdk** | installs packages required to develop applications in OpenCL for the AMD platform |
|
||||
| **rocm-hip-libraries** | installs HIP libraries optimized for AMD platforms |
|
||||
| **rocm-hip-sdk** | installs packages necessary to develop/port applications using HIP and libraries for AMD platforms |
|
||||
| **rocm-developer-tools** | installs packages required to debug and profile HIP-based applications |
|
||||
| **rocm-ml-sdk** | installs packages necessary to develop and run Machine Learning applications with Machine Learning primitives optimized for AMD platforms |
|
||||
| **rocm-ml-libraries** | installs packages for key Machine Learning libraries, specifically MIOpen |
|
||||
| **rocm-openmp-sdk** | installs packages necessary to develop OpenMP-based applications for AMD platforms |
|
||||
| **rocm-openmp-runtime** | installs packages necessary to run OpenMP-based applications for AMD platforms |
|
||||
```
|
||||
|
||||
## Packages in ROCm Programming Models
|
||||
|
||||
This section discusses the available meta-packages and their packages. The
|
||||
following image visualizes the meta-packages and their associated packages in a
|
||||
ROCm programming model.
|
||||
|
||||
```{figure-md} assoc-packages
|
||||
|
||||
<img src="../../data/understand/installing_linux/image.004.png" alt="">
|
||||
|
||||
Associated Packages
|
||||
```
|
||||
|
||||
- Meta-packages can include another meta-package.
|
||||
- rocm-core package is common across all the meta-packages.
|
||||
- Meta-packages and associated packages are represented in the same color.
|
||||
|
||||
```{note}
|
||||
{numref}`assoc-packages` is for informational purposes only, as the individual
|
||||
packages in a meta-package are subject to change. Install meta-packages, and not
|
||||
individual packages, to avoid conflicts.
|
||||
```
|
||||
|
||||
32
docs/understand/installing_linux/uninstall.md
Normal file
32
docs/understand/installing_linux/uninstall.md
Normal file
@@ -0,0 +1,32 @@
|
||||
## Uninstallation
|
||||
|
||||
ROCm may be uninstalled by removing its packages and unregistering the repo:
|
||||
|
||||
::::{tab-set}
|
||||
:::{tab-item} Ubuntu
|
||||
:sync: ubuntu
|
||||
|
||||
```console shell
|
||||
sudo apt autoremove rocm-core rocm-hip-libraries
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} Red Hat Enterprise Linux
|
||||
:sync: RHEL
|
||||
|
||||
```console shell
|
||||
sudo yum autoremove rocm-core rocm-hip-libraries
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} SUSE Linux Enterprise Server 15
|
||||
:sync: SLES15
|
||||
|
||||
```console shell
|
||||
sudo zypper rm -u rocm-core rocm-hip-libraries
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
Reference in New Issue
Block a user