diff --git a/.gitignore b/.gitignore index 31ae443c2..c8eaaf374 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,8 @@ _readthedocs/ docs/contributing.md docs/release.md docs/CHANGELOG.md + +# auto-generated files +docs/deploy/linux/installer/install.md +docs/deploy/linux/os-native/install.md +docs/deploy/linux/quick_start.md diff --git a/docs/conf.py b/docs/conf.py index f0ecb503e..4735f3215 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,9 +5,27 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html import shutil +import jinja2 +import os from rocm_docs import ROCmDocs +# Environement to process Jinja templates. +jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(".")) + +# Jinja templates to render out. +templates = [ + "./deploy/linux/quick_start.md.jinja", + "./deploy/linux/installer/install.md.jinja", + "./deploy/linux/os-native/install.md.jinja" +] + +# Render templates and output files without the last extension. +# For example: 'install.md.jinja' becomes 'install.md'. +for template in templates: + rendered = jinja_env.get_template(template).render() + with open(os.path.splitext(template)[0], 'w') as file: + file.write(rendered) shutil.copy2('../CONTRIBUTING.md','./contributing.md') shutil.copy2('../RELEASE.md','./release.md') diff --git a/docs/deploy/linux/installer/install.md b/docs/deploy/linux/installer/install.md.jinja similarity index 61% rename from docs/deploy/linux/installer/install.md rename to docs/deploy/linux/installer/install.md.jinja index 0802fdcc7..ba268ad3d 100644 --- a/docs/deploy/linux/installer/install.md +++ b/docs/deploy/linux/installer/install.md.jinja @@ -1,3 +1,5 @@ +{%- import "deploy/linux/linux.template.jinja" as linux %} + # Installation with install script Prior to beginning, please ensure you have the [prerequisites](../prerequisites) @@ -15,107 +17,48 @@ it via {ref}`hip_visible_devices`. To download and install the `amdgpu-install` script on the system, use the following commands based on your distribution. -::::::{tab-set} -:::::{tab-item} Ubuntu -:sync: ubuntu +{% call(family) linux.for_family_in(linux.supported_family) %} +{%- call(os) linux.for_os_in(linux.supported_os) %} -::::{tab-set} -:::{tab-item} Ubuntu 20.04 -:sync: ubuntu-20.04 +{%- if os.tag == "ubuntu" %} +{%- call(version) linux.for_version_in(os) %} + +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` ```shell sudo apt update -wget https://repo.radeon.com/amdgpu-install/5.7/ubuntu/focal/amdgpu-install_5.7.50700-1_all.deb -sudo apt install ./amdgpu-install_5.7.50700-1_all.deb +wget https://repo.radeon.com/amdgpu-install/{{ family.amdgpu_version }}/ubuntu/{{ version.release }}/amdgpu-install_{{ family.amdgpu_install_version }}_all.deb +sudo apt install ./amdgpu-install_{{ family.amdgpu_install_version }}_all.deb ``` +{%- endcall -%} +{%- elif os.tag == "rhel" %} +{%- call(version) linux.for_version_in(os) %} -::: -:::{tab-item} Ubuntu 22.04 -:sync: ubuntu-22.04 +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` ```shell -sudo apt update -wget https://repo.radeon.com/amdgpu-install/5.7/ubuntu/jammy/amdgpu-install_5.7.50700-1_all.deb -sudo apt install ./amdgpu-install_5.7.50700-1_all.deb +sudo yum install https://repo.radeon.com/amdgpu-install/{{ family.amdgpu_version }}/rhel/{{ version.number }}/amdgpu-install-{{ family.amdgpu_install_version }}.{{ version.release | trim("rh") }}.noarch.rpm ``` +{%- endcall -%} +{%- elif os.tag == "sle" %} +{%- call(version) linux.for_version_in(os) %} -::: -:::: -::::: -:::::{tab-item} Red Hat Enterprise Linux -:sync: RHEL - -::::{tab-set} -:::{tab-item} RHEL 8.6 -:sync: RHEL-8.6 -:sync: RHEL-8 +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` ```shell -sudo yum install https://repo.radeon.com/amdgpu-install/5.7/rhel/8.6/amdgpu-install-5.7.50700-1.el8.noarch.rpm +sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/{{ family.amdgpu_version }}/sle/{{ version.number }}/amdgpu-install-{{ family.amdgpu_install_version }}.noarch.rpm ``` +{%- endcall -%} +{%- endif %} -::: -:::{tab-item} RHEL 8.7 -:sync: RHEL-8.7 -:sync: RHEL-8 - -```shell -sudo yum install https://repo.radeon.com/amdgpu-install/5.7/rhel/8.7/amdgpu-install-5.7.50700-1.el8.noarch.rpm -``` - -::: -:::{tab-item} RHEL 8.8 -:sync: RHEL-8.8 -:sync: RHEL-8 - -```shell -sudo yum install https://repo.radeon.com/amdgpu-install/5.7/rhel/8.8/amdgpu-install-5.7.50700-1.el8.noarch.rpm -``` - -::: -:::{tab-item} RHEL 9.1 -:sync: RHEL-9.1 -:sync: RHEL-9 - -```shell -sudo yum install https://repo.radeon.com/amdgpu-install/5.7/rhel/9.1/amdgpu-install-5.7.50700-1.el9.noarch.rpm -``` - -::: -:::{tab-item} RHEL 9.2 -:sync: RHEL-9.2 -:sync: RHEL-9 - -```shell -sudo yum install https://repo.radeon.com/amdgpu-install/5.7/rhel/9.2/amdgpu-install-5.7.50700-1.el9.noarch.rpm -``` - -::: -:::: -::::: -:::::{tab-item} SUSE Linux Enterprise Server -:sync: SLES - -::::{tab-set} -:::{tab-item} SLES 15.4 -:sync: SLES-15.4 - -```shell -sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/5.7/sle/15.4/amdgpu-install-5.7.50700-1.noarch.rpm -``` - -::: -:::{tab-item} SLES 15.5 -:sync: SLES-15.5 - -```shell -sudo zypper --no-gpg-checks install https://repo.radeon.com/amdgpu-install/5.7/sle/15.5/amdgpu-install-5.7.50700-1.noarch.rpm -``` - -::: -:::: -::::: -:::::: +{%- endcall -%} +{%- endcall %} ## Use cases @@ -200,9 +143,9 @@ 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 +**Example:** If you want to install ROCm releases 5.5.3, 5.6.1 and {{ linux.supported_family[0].rocm_version }} simultaneously, you are required to download the installer from the latest ROCm -release 5.7. +release {{ linux.supported_family[0].rocm_version }}. ### Add Required Repositories @@ -212,50 +155,37 @@ automatically adds the required repositories for the latest release. Run the following commands based on your distribution to add the repositories: -::::::{tab-set} -:::::{tab-item} Ubuntu -:sync: ubuntu +{% call(family) linux.for_family_in(linux.supported_family) %} +{%- call(os) linux.for_os_in(linux.supported_os) %} -::::{tab-set} -:::{tab-item} Ubuntu 20.04 -:sync: ubuntu-20.04 +{%- if os.tag == "ubuntu" %} +{%- call(version) linux.for_version_in(os) %} + +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` ```shell -for ver in 5.5.3 5.6.1 5.7; 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 +for ver in 5.5.3 5.6.1 {{ linux.supported_family[0].rocm_version }}; do +echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/rocm/apt/$ver {{ version.release }} 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 ``` +{%- endcall -%} +{%- elif os.tag == "rhel" %} +{%- call(version) linux.for_version_in(os) %} -::: -:::{tab-item} Ubuntu 22.04 -:sync: ubuntu-22.04 - -```shell -for ver in 5.5.3 5.6.1 5.7; 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 +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} ``` -::: -:::: -::::: -:::::{tab-item} Red Hat Enterprise Linux -:sync: RHEL - -::::{tab-set} -:::{tab-item} RHEL 8 -:sync: RHEL-8 - ```shell -for ver in 5.5.3 5.6.1 5.7; do +for ver in 5.5.3 5.6.1 {{ linux.supported_family[0].rocm_version }}; do sudo tee --append /etc/yum.repos.d/rocm.repo < sudo amdgpu-install --usecase=rocm --rocmrelease= sudo amdgpu-install --usecase=rocm --rocmrelease= ``` Following are examples of ROCm multi-version installation. The kernel-mode -driver, associated with the ROCm release 5.7, will be installed as its latest +driver, associated with the ROCm release {{ linux.supported_family[0].rocm_version }}, will be installed as its latest release in the list. -```none -sudo amdgpu-install --usecase=rocm --rocmrelease=5.7 +```shell +sudo amdgpu-install --usecase=rocm --rocmrelease={{ linux.supported_family[0].rocm_version }} sudo amdgpu-install --usecase=rocm --rocmrelease=5.6.1 sudo amdgpu-install --usecase=rocm --rocmrelease=5.5.3 ``` diff --git a/docs/deploy/linux/linux.template.jinja b/docs/deploy/linux/linux.template.jinja new file mode 100644 index 000000000..f2029fd78 --- /dev/null +++ b/docs/deploy/linux/linux.template.jinja @@ -0,0 +1,120 @@ +{%- set supported_family = ([ + { + "tag": "instinct", + "name": "Select OS", + "amdgpu_version": "5.7.1", + "amdgpu_install_version": "5.7.50701-1", + "rocm_version": "5.7.1", + "rocm_install_version": "5.7.50701-1", + } +]) -%} + +{%- set supported_os = ([ + { + "tag": "ubuntu", + "name": "Ubuntu", + "shortname" : "Ubuntu", + "version": [ + { + "number": "22.04", + "release": "jammy" + }, + { + "number": "20.04", + "release": "focal" + } + ] + }, + { + "tag": "rhel", + "name": "Red Hat Enterprise Linux", + "shortname" : "RHEL", + "version": [ + { + "number": "8.8", + "release": "rhel8" + }, + { + "number": "8.7", + "release": "rhel8" + }, + { + "number": "8.6", + "release": "rhel8" + }, + { + "number": "9.2", + "release": "rhel9" + }, + { + "number": "9.1", + "release": "rhel9" + }, + ] + }, + { + "tag": "sle", + "name": "SUSE Linux Enterprise Server", + "shortname" : "SLES", + "version": [ + { + "number": "15.5" + }, + { + "number": "15.4" + }, + ] + } +]) -%} + +{%- macro for_family_in(supported_family) %} +::::::::{tab-set} +{%- for family in supported_family %} +:::::::{tab-item} {{ family.name }} +:sync: {{ family.tag }} +{{ caller(family) }} + +::::::: +{%- endfor %} +:::::::: +{%- endmacro -%} + +{%- macro for_os_in(supported_os) %} +::::::{tab-set} +{%- for os in supported_os %} +:::::{tab-item} {{ os.name }} +:sync: {{ os.tag }} +{{ caller(os) }} + +::::: +{%- endfor %} +:::::: +{%- endmacro -%} + +{%- macro for_version_in(os) %} +::::{tab-set} +{%- for version in os.version %} +:::{tab-item} {{ os.shortname }} {{ version.number }} +:sync: {{ os.tag }}-{{ version.number }} +{{ caller(version) }} + +::: +{%- endfor %} +:::: +{%- endmacro -%} + +{%- macro install(os, argument) %} +```shell +{%- if os.tag == "ubuntu" %} +sudo apt install {{ argument }} +{%- elif os.tag == "rhel" %} +sudo yum install {{ argument }} +{%- elif os.tag == "sle" %} +sudo zypper install {{ argument }} +{%- endif %} +``` +{%- endmacro -%} + +{%- macro header_anchor(family, os) -%} +({{ caller() | lower | replace('#', '') | trim | replace(' ', '-')}}-{{ family.tag }}-{{ os.tag }})= {{ caller() }} +{%- endmacro -%} diff --git a/docs/deploy/linux/os-native/install.md b/docs/deploy/linux/os-native/install.md.jinja similarity index 69% rename from docs/deploy/linux/os-native/install.md rename to docs/deploy/linux/os-native/install.md.jinja index bd5f6bf30..3a87355fc 100644 --- a/docs/deploy/linux/os-native/install.md +++ b/docs/deploy/linux/os-native/install.md.jinja @@ -1,3 +1,5 @@ +{%- import "deploy/linux/linux.template.jinja" as linux %} + # Installation (Linux) ```{warning} @@ -19,10 +21,9 @@ installed version by using the multi-version ROCm packages. ## Step by Step Instructions -::::::{tab-set} -:::::{tab-item} Ubuntu -:sync: ubuntu +{%- call(os) linux.for_os_in(linux.supported_os) %} +{%- if os.tag == "ubuntu" %} ::::{rubric} 1. Download and convert the package signing key :::: @@ -53,39 +54,22 @@ section. ``` To add the AMDGPU repository, follow these steps: +{% call(version) linux.for_version_in(os) %} -::::{tab-set} -:::{tab-item} Ubuntu 20.04 -:sync: ubuntu-20.04 +```{important} +Instructions for {{ os.name }} {{ version.number }} +``` ```shell # version -ver=5.7 +ver={{ linux.supported_family[0].amdgpu_version }} # amdgpu repository for focal -echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/$ver/ubuntu focal main" \ +echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/$ver/ubuntu {{ version.release }} main" \ | sudo tee /etc/apt/sources.list.d/amdgpu.list sudo apt update ``` - -::: -:::{tab-item} Ubuntu 22.04 -:sync: ubuntu-22.04 - -```shell -# version -ver=5.7 - -# amdgpu repository for jammy -echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/$ver/ubuntu jammy main" \ - | sudo tee /etc/apt/sources.list.d/amdgpu.list -sudo apt update -# Prefer packages from the rocm repository over system packages -echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 -``` - -::: -:::: +{%- endcall %} Install the kernel mode driver and reboot the system using the following commands: @@ -100,38 +84,23 @@ sudo reboot To add the ROCm repository, use the following steps: -::::{tab-set} -:::{tab-item} Ubuntu 20.04 -:sync: ubuntu-20.04 +{%- call(version) linux.for_version_in(os) %} + +```{important} +Instructions for {{ os.name }} {{ version.number }} +``` ```shell -# ROCm repositories for focal -for ver in 5.3.3 5.4.6 5.5.3 5.6.1 5.7; do -echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/$ver focal main" \ +# ROCm repositories for {{ version.release }} +for ver in 5.3.3 5.4.6 5.5.3 5.6.1 {{ linux.supported_family[0].rocm_version }}; do +echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/$ver {{ version.release }} main" \ | sudo tee --append /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 -# ROCm repositories for jammy -for ver in 5.3.3 5.4.6 5.5.3 5.6.1 5.7; do -echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/$ver jammy main" \ - | sudo tee --append /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 -``` - -::: -:::: +{%- endcall %} ::::{rubric} 4. Install packages :::: @@ -151,13 +120,9 @@ For a comprehensive list of meta-packages, refer to - Sample Multi-version installation ```shell - sudo apt install rocm-hip-sdk5.7 rocm-hip-sdk5.6.1 rocm-hip-sdk5.5.3 + sudo apt install rocm-hip-sdk{{ linux.supported_family[0].rocm_version }} rocm-hip-sdk5.6.1 rocm-hip-sdk5.5.3 ``` - -::::: -:::::{tab-item} Red Hat Enterprise Linux -:sync: RHEL - +{%- elif os.tag == "rhel" %} ::::{rubric} 1. Add the AMDGPU Stack Repository and Install the Kernel-mode Driver :::: @@ -165,21 +130,20 @@ For a comprehensive list of meta-packages, refer to If you have a version of the kernel-mode driver installed, you may skip this section. ``` +{% call(version) linux.for_version_in(os) %} -::::{tab-set} -:::{tab-item} RHEL 8.6 -:sync: RHEL-8.6 -:sync: RHEL-8 +```{important} +Instructions for {{ os.name }} {{ version.number }} +``` ```shell # version -ver=5.7 - +ver={{ linux.supported_family[0].amdgpu_version }} sudo tee /etc/yum.repos.d/amdgpu.repo < /dev/null -``` - -::::{rubric} 2. Add the repositories -:::: - -::::{tab-set} -:::{tab-item} Ubuntu 20.04 -:sync: ubuntu-20.04 - -```shell -# Kernel driver repository for focal -sudo tee /etc/apt/sources.list.d/amdgpu.list <<'EOF' -deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/latest/ubuntu focal main -EOF -# ROCm repository for focal -sudo tee /etc/apt/sources.list.d/rocm.list <<'EOF' -deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/debian focal main -EOF -``` - -::: -:::{tab-item} Ubuntu 22.04 -:sync: ubuntu-22.04 - -```shell -# Kernel driver repository for jammy -sudo tee /etc/apt/sources.list.d/amdgpu.list <<'EOF' -deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/latest/ubuntu jammy main -EOF -# ROCm repository for jammy -sudo tee /etc/apt/sources.list.d/rocm.list <<'EOF' -deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/debian jammy main -EOF -# Prefer packages from the rocm repository over system packages -echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 -``` - -::: -:::: - -::::{rubric} 3. Update the list of packages -:::: - -```shell -sudo apt update -``` - -::::: - -:::::{tab-item} Red Hat Enterprise Linux -:sync: RHEL - -::::{rubric} 1. Add the repositories -:::: - -::::{tab-set} -:::{tab-item} RHEL 8.6 -:sync: RHEL-8.6 - -```shell -# Add the amdgpu module repository for RHEL 8.6 -sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/rhel/8.6/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for RHEL 8 -sudo tee /etc/yum.repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/rhel8/latest/main -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: - -:::{tab-item} RHEL 8.7 -:sync: RHEL-8.7 - -```shell -# Add the amdgpu module repository for RHEL 8.7 -sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/rhel/8.7/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for RHEL 8 -sudo tee /etc/yum.repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/rhel8/latest/main -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: - -:::{tab-item} RHEL 8.8 -:sync: RHEL-8.8 - -```shell -# Add the amdgpu module repository for RHEL 8.8 -sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/rhel/8.8/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for RHEL 8 -sudo tee /etc/yum.repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/rhel8/latest/main -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: - -:::{tab-item} RHEL 9.1 -:sync: RHEL-9.1 - -```shell -# Add the amdgpu module repository for RHEL 9.1 -sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/rhel/9.1/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for RHEL 9 -sudo tee /etc/yum.repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/rhel9/latest/main -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: - -:::{tab-item} RHEL 9.2 -:sync: RHEL-9.2 - -```shell -# Add the amdgpu module repository for RHEL 9.2 -sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/rhel/9.2/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for RHEL 9 -sudo tee /etc/yum.repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/rhel9/latest/main -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: -:::: - -::::{rubric} 2. Clean cached files from enabled repositories -:::: - -```shell -sudo yum clean all -``` - -::::: - -:::::{tab-item} SUSE Linux Enterprise Server -:sync: SLES - -::::{rubric} 1. Add the repositories -:::: - -::::{tab-set} -:::{tab-item} SLES 15.4 -:sync: SLES-15.4 - -```shell - -# Add the amdgpu module repository for SLES 15.4 -sudo tee /etc/zypp/repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/sle/15.4/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for SLES -sudo tee /etc/zypp/repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/zyp/zypper -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: -:::{tab-item} SLES 15.5 -:sync: SLES-15.5 - -```shell - -# Add the amdgpu module repository for SLES 15.5 -sudo tee /etc/zypp/repos.d/amdgpu.repo <<'EOF' -[amdgpu] -name=amdgpu -baseurl=https://repo.radeon.com/amdgpu/latest/sle/15.5/main/x86_64 -enabled=1 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -# Add the rocm repository for SLES -sudo tee /etc/zypp/repos.d/rocm.repo <<'EOF' -[rocm] -name=rocm -baseurl=https://repo.radeon.com/rocm/zyp/zypper -enabled=1 -priority=50 -gpgcheck=1 -gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key -EOF -``` - -::: -:::: - -::::{rubric} 2. Update the new repository -:::: - -```shell -sudo zypper ref -``` - -::::: -:::::: - -## Install Drivers - -Install the `amdgpu-dkms` kernel module, aka driver, on your system. - -::::{tab-set} - -:::{tab-item} Ubuntu -:sync: ubuntu - -```shell -sudo apt install amdgpu-dkms -``` - -::: - -:::{tab-item} Red Hat Enterprise Linux -:sync: RHEL - -```shell -sudo yum install amdgpu-dkms -``` - -::: - -:::{tab-item} SUSE Linux Enterprise Server -:sync: SLES - -```shell -sudo zypper install amdgpu-dkms -``` - -::: - -:::: - -## Install ROCm Runtimes - -Install the `rocm-hip-libraries` meta-package. This contains dependencies for most -common ROCm applications. - -::::{tab-set} -:::{tab-item} Ubuntu -:sync: ubuntu - -```console shell -sudo apt install rocm-hip-libraries -``` - -::: - -:::{tab-item} Red Hat Enterprise Linux -:sync: RHEL - -```console shell -sudo yum install rocm-hip-libraries -``` - -::: - -:::{tab-item} SUSE Linux Enterprise Server -:sync: SLES - -```console shell -sudo zypper install rocm-hip-libraries -``` - -::: -:::: - -## Reboot the system - -Loading the new driver requires a reboot of the system. - -```shell -sudo reboot -``` diff --git a/docs/deploy/linux/quick_start.md.jinja b/docs/deploy/linux/quick_start.md.jinja new file mode 100644 index 000000000..b6c6c3d37 --- /dev/null +++ b/docs/deploy/linux/quick_start.md.jinja @@ -0,0 +1,161 @@ +{%- import "deploy/linux/linux.template.jinja" as linux %} + +# Quick Start (Linux) + +## Add Repositories +{% call(family) linux.for_family_in(linux.supported_family) %} + +{%- if family.tag == "instinct" %} + +{%- call(os) linux.for_os_in(linux.supported_os) %} + +{%- if os.tag == "ubuntu" %} +::::{rubric} 1. Download and convert the package signing key +:::: + +```shell +# Make the directory if it doesn't exist yet. +# This location is recommended by the distribution maintainers. +sudo mkdir --parents --mode=0755 /etc/apt/keyrings +# Download the key, convert the signing-key to a full +# keyring required by apt and store in the keyring directory +wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \ + gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null +``` + +::::{rubric} 2. Add the repositories +:::: +{%- call(version) linux.for_version_in(os) %} + +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` + +```shell +# Kernel driver repository for {{ version.release }} +sudo tee /etc/apt/sources.list.d/amdgpu.list <<'EOF' +deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/{{ family.amdgpu_version }}/ubuntu {{ version.release }} main +EOF +# ROCm repository for {{ version.release }} +sudo tee /etc/apt/sources.list.d/rocm.list <<'EOF' +deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/debian {{ version.release }} main +EOF +# Prefer packages from the rocm repository over system packages +echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 +``` + +{%- endcall %} + +::::{rubric} 3. Update the list of packages +:::: + +```shell +sudo apt update +``` +{%- elif os.tag == "rhel" %} +::::{rubric} 1. Add the repositories +:::: +{%- call(version) linux.for_version_in(os) %} + +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` + +```shell +# Add the amdgpu module repository for RHEL {{ version.number }} +sudo tee /etc/yum.repos.d/amdgpu.repo <<'EOF' +[amdgpu] +name=amdgpu +baseurl=https://repo.radeon.com/amdgpu/{{ family.amdgpu_version }}/rhel/{{ version.number }}/main/x86_64 +enabled=1 +gpgcheck=1 +gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key +EOF +# Add the rocm repository for {{ version.release | upper }} +sudo tee /etc/yum.repos.d/rocm.repo <<'EOF' +[rocm] +name=rocm +baseurl=https://repo.radeon.com/rocm/{{ version.release }}/latest/main +enabled=1 +priority=50 +gpgcheck=1 +gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key +EOF +``` + +{%- endcall %} + +::::{rubric} 2. Clean cached files from enabled repositories +:::: + +```shell +sudo yum clean all +``` +{%- elif os.tag == "sle" %} +::::{rubric} 1. Add the repositories +:::: +{%- call(version) linux.for_version_in(os) %} + +```{important} +Instructions for {{ family.name }}, {{ os.name }} {{ version.number }} +``` + +```shell +# Add the amdgpu module repository for SLES {{ version.number }} +sudo tee /etc/zypp/repos.d/amdgpu.repo <<'EOF' +[amdgpu] +name=amdgpu +baseurl=https://repo.radeon.com/amdgpu/{{ family.amdgpu_version }}/sle/{{ version.number }}/main/x86_64 +enabled=1 +gpgcheck=1 +gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key +EOF +# Add the rocm repository for SLES +sudo tee /etc/zypp/repos.d/rocm.repo <<'EOF' +[rocm] +name=rocm +baseurl=https://repo.radeon.com/rocm/zyp/zypper +enabled=1 +priority=50 +gpgcheck=1 +gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key +EOF +``` + +{%- endcall %} + +::::{rubric} 2. Update the new repository +:::: + +```shell +sudo zypper ref +``` +{%- endif %} +{%- endcall -%} +{%- endif %} +{%- endcall %} + +## Install drivers + +Install the `amdgpu-dkms` kernel module, aka driver, on your system. + +{%- call(os) linux.for_os_in(linux.supported_os) %} +{{ linux.install(os, "amdgpu-dkms")}} +{%- endcall %} + +## Install ROCm runtimes + +Install the `rocm-hip-libraries` meta-package. This contains dependencies for most +common ROCm applications. + +{%- call(os) linux.for_os_in(linux.supported_os) %} +{{ linux.install(os, "rocm-hip-libraries")}} +{%- endcall %} + +## Reboot the system + +Loading the new driver requires a reboot of the system. + +```shell +sudo reboot +``` diff --git a/docs/how_to/all.md b/docs/how_to/all.md index 9b1290e57..80dda557a 100644 --- a/docs/how_to/all.md +++ b/docs/how_to/all.md @@ -3,6 +3,14 @@ :::::{grid} 1 1 2 2 :gutter: 1 +:::{grid-item-card} ROCm using Radeon +:link: {doc}`ROCm using Radeon ` +:link-type: url +ROCm and PyTorch installation processes to pair with the Radeon RX 7900 XTX GPU or the Radeon PRO W7900 GPU, +and get started on a fully-functional environment for AI and ML development. + +::: + :::{grid-item-card} Tuning Guides :link: tuning_guides/index :link-type: doc diff --git a/docs/index.md b/docs/index.md index 3e6465ad4..098924865 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,6 +17,7 @@ tools, and APIs that enable GPU programming from low-level kernel to end-user ap - {doc}`/deploy/linux/index` - {doc}`/deploy/docker` +- {doc}`Deploy ROCm using Radeon ` ::: :::: diff --git a/docs/release/3rd_party_support_matrix.md b/docs/release/3rd_party_support_matrix.md index 40de6d89e..6fe4db25e 100644 --- a/docs/release/3rd_party_support_matrix.md +++ b/docs/release/3rd_party_support_matrix.md @@ -57,8 +57,8 @@ contemporary CUDA / NVIDIA HPC SDK alternatives. | 5.3.x | 1.16 | 22.7 | | 5.4.x | 1.16 | 22.9 | | 5.5.x | 1.17 | 22.9 | -| 5.6 | 1.17.2 | 22.9 | -| 5.7 | 1.17.2 | 22.9 | +| 5.6.x | 1.17.2 | 22.9 | +| 5.7.x | 1.17.2 | 22.9 | For the latest documentation of these libraries, refer to the [associated documentation](../reference/gpu_libraries/c%2B%2B_primitives.md). diff --git a/docs/release/user_kernel_space_compat_matrix.md b/docs/release/user_kernel_space_compat_matrix.md index 7191298b8..a99d5e5c1 100644 --- a/docs/release/user_kernel_space_compat_matrix.md +++ b/docs/release/user_kernel_space_compat_matrix.md @@ -21,3 +21,4 @@ the compatibility combinations that are currently supported. | 5.6.0 | 5.4.3, 5.5.1 | | 5.6.1 | 5.7.0 | | 5.7.0 | 5.5.0, 5.6.1 | +| 5.7.1 | 5.5.0, 5.6.1 | diff --git a/docs/rocm.md b/docs/rocm.md index 454e4ee4b..16dc0a834 100644 --- a/docs/rocm.md +++ b/docs/rocm.md @@ -19,6 +19,14 @@ ROCm supports programming models, such as OpenMP and OpenCL, and includes all ne compilers, debuggers, and libraries. ROCm is fully integrated into machine learning (ML) frameworks, such as PyTorch and TensorFlow. +## ROCm on Radeon + +Starting with ROCm™ 5.7 on Linux®, researchers and developers working with Machine Learning (ML) models and algorithms can tap into the parallel computing power of the AMD desktop GPUs based on the RDNA™ 3 architecture. + +A client solution built on powerful high-end AMD GPUs provides a local, private and often cost-effective workflow to develop ROCm and train ML (PyTorch) for the users who previously relied solely on cloud-based solutions. + +For information about how to install ROCm on AMD desktop GPUs based on the RDNA™ 3 architecture, see {doc}`Use ROCm on Radeon `. For more information about supported AMD Radeon™ desktop GPUs, see {doc}`Radeon Compatibility Matrices `. + ## ROCm on Windows Starting with ROCm 5.5, the HIP SDK brings a subset of ROCm to developers on Windows. diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index 313c5e941..33e978384 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core>=0.24.0 +rocm-docs-core==0.25.0 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index 184926a80..0e2a0aa95 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -46,6 +46,10 @@ idna==3.4 # via requests imagesize==1.4.1 # via sphinx +importlib-metadata==6.8.0 + # via sphinx +importlib-resources==6.1.0 + # via rocm-docs-core jinja2==3.1.2 # via # myst-parser @@ -94,7 +98,7 @@ requests==2.31.0 # via # pygithub # sphinx -rocm-docs-core>=0.24.0 +rocm-docs-core==0.25.0 # via -r requirements.in smmap==5.0.0 # via gitdb @@ -141,3 +145,7 @@ urllib3==1.26.13 # via requests wrapt==1.14.1 # via deprecated +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources