Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic formatting #91

Merged
merged 5 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ pip3 install -r sphinx/requirements.txt

python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
```

## Build using PDM

You can also use [PDM](https://pdm-project.org/latest/#installation) to manage the build environment.

* To create `venv` and install build requirements, use: `pdm sync`
* To build the docs, use: `pdm run inv build`

Now you can open `docs/_build/html/index.html` in your browser.
25 changes: 15 additions & 10 deletions docs/how-to/native-install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ Installation via native package manager

.. grid-item-card:: Install

- :doc:`Ubuntu</how-to/native-install/ubuntu>`
- :doc:`Red Hat Enterprise Linux</how-to/native-install/rhel>`
- :doc:`SUSE Linux Enterprise</how-to/native-install/sles>`
* :doc:`Ubuntu <./ubuntu>`
* :doc:`RHEL <./rhel>`
* :doc:`SLES <./sles>`

.. grid-item-card:: Upgrade
.. grid-item-card:: Post-install

Instructions for upgrading an existing ROCm installation.
* :doc:`post-install steps <./post-install>`

- :ref:`Ubuntu<ubuntu-upgrade>`
.. grid-item-card:: Upgrade

.. grid-item-card:: Uninstall
* :ref:`Ubuntu <ubuntu-upgrade>`
* :ref:`RHEL <rhel-upgrade>`
* :ref:`SLES <sles-upgrade>`

Steps for removing ROCm packages libraries and tools.
.. grid-item-card:: Uninstall

- :ref:`Ubuntu<ubuntu-uninstall>`
* :ref:`Ubuntu <ubuntu-uninstall>`
* :ref:`RHEL <rhel-uninstall>`
* :ref:`SLES <sles-uninstall>`

.. grid-item-card:: Package manager integration
:link: package-manager-integration.html

Required meta-packages for ROCm programming models.

* :doc:`meta-packages <./package-manager-integration>`

See also: :doc:`/reference/system-requirements`.
64 changes: 32 additions & 32 deletions docs/how-to/native-install/post-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,59 @@
Post-installation instructions
*************************************************************************

1. Configure the system linker.
#. Configure the system linker.

Instruct the system linker where to find shared objects (``.so``-files) for ROCm applications.
Instruct the system linker where to find shared objects (``.so``-files) for ROCm applications.

.. code-block:: bash
.. code-block:: bash

sudo tee --append /etc/ld.so.conf.d/rocm.conf <<EOF
/opt/rocm/lib
/opt/rocm/lib64
EOF
sudo ldconfig
sudo tee --append /etc/ld.so.conf.d/rocm.conf <<EOF
/opt/rocm/lib
/opt/rocm/lib64
EOF
sudo ldconfig

2. Configure ``PATH``.
#. Configure ``PATH``.

Add binary paths to the ``PATH`` environment variable.
Add binary paths to the ``PATH`` environment variable.

.. code-block:: bash
:substitutions:
.. code-block:: bash
:substitutions:

export PATH=$PATH:/opt/rocm-|rocm_directory_version|/bin
export PATH=$PATH:/opt/rocm-|rocm_directory_version|/bin

3. Verify kernel-mode driver installation.
#. Verify kernel-mode driver installation.

.. code-block:: bash
.. code-block:: bash

dkms status
dkms status

4. Verify ROCm installation.
#. Verify ROCm installation.

.. code-block:: bash
:substitutions:
.. code-block:: bash
:substitutions:

/opt/rocm-|rocm_directory_version|/bin/rocminfo
/opt/rocm-|rocm_directory_version|/bin/clinfo
/opt/rocm-|rocm_directory_version|/bin/rocminfo
/opt/rocm-|rocm_directory_version|/bin/clinfo

5. Verify package installation.
#. Verify package installation.

.. tab-set::
.. tab-set::

.. tab-item:: Ubuntu
.. tab-item:: Ubuntu

.. code-block:: bash
.. code-block:: bash

sudo apt list --installed
sudo apt list --installed

.. tab-item:: RHEL
.. tab-item:: RHEL

.. code-block:: bash
.. code-block:: bash

sudo yum list installed
sudo yum list installed

.. tab-item:: SLES
.. tab-item:: SLES

.. code-block:: bash
.. code-block:: bash

sudo zypper search --installed-only
sudo zypper search --installed-only
6 changes: 4 additions & 2 deletions docs/how-to/native-install/rhel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ Register ROCm packages

.. include:: install-rocm-template.rst

.. _rhel-upgrade:

Upgrade
=====================================================

To upgrade an existing ROCm installation to a newer version, follow the steps in
:ref:`rhel-register-repo` and :ref:`rhel-install`.
:ref:`rhel-register-repo` and :ref:`rhel-install`.

.. note::

Expand All @@ -82,4 +84,4 @@ To upgrade an existing ROCm installation to a newer version, follow the steps in

.. _rhel-uninstall:

.. include:: uninstall-rocm-template.rst
.. include:: uninstall-rocm-template.rst
10 changes: 7 additions & 3 deletions docs/how-to/native-install/sles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,21 @@ Install ROCm packages

Complete the :doc:`post-install`.

.. _sles-upgrade:

Upgrading
================================================

To upgrade an existing ROCm installation to a newer version, follow the steps in
:ref:`sles-register-rocm` and :ref:`sles-install`.
:ref:`sles-register-rocm` and :ref:`sles-install`.

.. note::

Upgrading the kernel driver may also upgrade the GPU firmware, which requires a
system reboot to take effect.

.. _sles-uninstall:

Uninstalling
================================================

Expand All @@ -99,7 +103,7 @@ Uninstall specific meta packages
# sudo zypper remove <package-name>
# For example:
sudo zypper remove rocm
# Or for version specific packages:
# Or, for version specific packages:
sudo zypper remove rocm|rocm_version|

Uninstall ROCm packages
Expand Down Expand Up @@ -130,7 +134,7 @@ Remove ROCm and AMDGPU repositories
#
# The name of the repositories can be listed with:
sudo zypper repos

# Then remove the 'ROCm' and 'amdgpu' repositories.
# For example:
sudo zypper removerepo ROCm-|rocm_version|
Expand Down
75 changes: 37 additions & 38 deletions docs/how-to/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,41 @@ Installation prerequisites

Before installing ROCm, complete the following prerequisites.

1. Confirm the system has a supported Linux version.
#. Confirm the system has a supported Linux version.

a. To obtain the Linux distribution information, type the following command on your system from
the Command Line Interface (CLI):
* To obtain the Linux distribution information, type the following command on your system from the Command Line Interface (CLI):

.. code-block:: shell
.. code-block:: shell

uname -m && cat /etc/*release
uname -m && cat /etc/*release

b. Confirm that your Linux distribution matches a
:ref:`supported distribution<supported_distributions>`.
* Confirm that your Linux distribution matches a :ref:`supported distribution<supported_distributions>`.

**Example:** Running the preceding command on an Ubuntu system produces the following output:
**Example:** Running the preceding command on an Ubuntu system produces the following output:

.. code-block:: shell
.. code-block:: shell

x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

2. Verify the kernel version.
#. Verify the kernel version.

a. To check the kernel version of your Linux system, type the following command:
* To check the kernel version of your Linux system, type the following command:

.. code-block:: shell
.. code-block:: shell

uname -srmv
uname -srmv

**Example:** The preceding command lists the kernel version in the following format:
**Example:** The preceding command lists the kernel version in the following format:

.. code-block:: shell
.. code-block:: shell

Linux 5.15.0-46-generic #44~20.04.5-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64
Linux 5.15.0-46-generic #44~20.04.5-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64

b. Confirm that your kernel version matches the system requirements, as listed in :ref:`supported_distributions`.
* Confirm that your kernel version matches the system requirements, as listed in :ref:`supported_distributions`.

Additional package repositories
==========================================================
Expand All @@ -65,28 +63,28 @@ installation. Follow the instructions below based on your distributions.

1. Add the EPEL repository.

.. datatemplate:nodata::
.. datatemplate:nodata::

.. tab-set::
{% for os_release in config.html_context['rhel_release_version_numbers'] %}
.. tab-item:: RHEL/OL {{ os_release }}
.. tab-set::

.. code-block:: shell
{% for os_release in config.html_context['rhel_release_version_numbers'] %}

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ os_release }}.noarch.rpm
sudo rpm -ivh epel-release-latest-{{ os_release }}.noarch.rpm
{% endfor %}
.. tab-item:: RHEL/OL {{ os_release }}

2. Enable the CodeReady Linux Builder (CRB) repository.
.. code-block:: shell

In order to enable CRB, you may need to install ``dnf-plugin-config-manager`` first.
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ os_release }}.noarch.rpm
sudo rpm -ivh epel-release-latest-{{ os_release }}.noarch.rpm

.. code-block:: shell
{% endfor %}

sudo dnf install dnf-plugin-config-manager
2. Enable the CodeReady Linux Builder (CRB) repository.

In order to enable CRB, you may need to install ``dnf-plugin-config-manager`` first.

.. code-block:: shell

sudo dnf install dnf-plugin-config-manager
sudo crb enable

.. tab-item:: SUSE Linux Enterprise Server
Expand All @@ -95,24 +93,25 @@ installation. Follow the instructions below based on your distributions.
Add the Perl language repository.

.. datatemplate:nodata::

.. tab-set::

{% for os_version in config.html_context['sles_version_numbers'] %}
{% set os_release, os_sp = os_version.split('.') %}

.. tab-item:: SLES {{ os_version }}

.. code-block:: shell

zypper addrepo https://download.opensuse.org/repositories/devel:/languages:/perl/{{ os_version }}/devel:languages:perl.repo

{% endfor %}

Kernel headers and development packages
================================================================

The driver package uses
`DKMS (Dynamic Kernel Module Support) <https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support>`_
`Dynamic Kernel Module Support (DKMS) <https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support>`_
to build the `amdgpu-dkms` module (driver) for the installed kernels. This requires the Linux kernel
headers and modules to be installed for each. Usually these are automatically installed with the kernel,
but if you have multiple kernel versions or you have downloaded the kernel images and not the kernel
Expand Down
16 changes: 8 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ complete instructions, refer to the following sections.

ROCm quick-start installation guide.

.. grid-item-card:: Install options
:link: tutorial/install-overview
:link-type: doc

* Package manager vs AMDGPU installer
* Single-version vs multi-version

.. grid-item-card:: Prerequisites
:link: how-to/prerequisites
:link-type: doc

Steps required before installation.

.. grid-item-card:: Install overview
:link: tutorial/install-overview
:link-type: doc

* Package manager vs AMDGPU installer
* Single-version vs multi-version

Choose your install method
========================================

Expand Down Expand Up @@ -72,4 +72,4 @@ Additional resources
.. grid-item-card:: How-to guides

- :doc:`how-to/docker`
- :doc:`how-to/spack`
- :doc:`how-to/spack`
Loading
Loading