Dosyalar
rocm-systems/docs/install/install.md
T
Peter Park e196f98dba docs: Remove redundant/stale docs
bump rocm-docs-core to 1.8.2

rm unused files

rm stale docs

fix sphinx conf

reorg docs

SWDEV-482203 -- add note to usage guides

update readmes

Change-Id: I9e0111ac8fe2a691ac964b27436ba47747c27904
Signed-off-by: Peter Park <Peter.Park@amd.com>
2024-11-11 16:49:17 -04:00

4.1 KiB

myst
myst
html_meta
description lang=en keywords
How to install AMD SMI libraries and CLI tool. system, management, interface, cpu, gpu, hsmp, versions

AMD SMI library and CLI tool

This section describes how to install the AMD SMI library, Python interface, and command line tool either as part of the {doc}ROCm software stack <rocm:what-is-rocm> -- or manually.

(install_reqs)=

Requirements

The following are required to install and use the AMD SMI libraries and CLI tool.

  • Python 3.6.8+ (64-bit)
  • amdgpu driver must be loaded for amdsmi_init() to work.

Supported platforms

At initial release, the AMD SMI library will support Linux bare metal and Linux virtual machine guest for AMD GPUs. In a future release, the library will be extended to support AMD EPYC™ CPUs.

AMD SMI library can run on AMD ROCm supported platforms, refer to {doc}System requirements (Linux) <rocm-install-on-linux:reference/system-requirements> for more information.

To run the AMD SMI library, the amdgpu driver and the amd_hsmp driver need to be installed. Optionally, libdrm can be installed to query firmware information and hardware IPs.

(install_amdgpu_rocm)=

Install amdgpu driver and AMD SMI with ROCm

  1. Get the amdgpu-install installer following the instructions for your Linux distribution at {doc}rocm-install-on-linux:install/amdgpu-install.

    See the following example; your desired ROCm release and install URL may be different.

    sudo apt update
    wget https://repo.radeon.com/amdgpu-install/6.2.2/ubuntu/noble/amdgpu-install_6.2.60202-1_all.deb
    sudo apt install ./amdgpu-install_6.2.60202-1_all.deb
    
  2. Use amdgpu-install to install the amdgpu driver and ROCm packages with AMD SMI included.

    sudo amdgpu-install --usecase=rocm
    

    The amdgpu-install --usecase=rocm option triggers both an amdgpu driver update and AMD SMI packages to be installed on your device.

  3. Verify your installation.

    amd-smi --help
    

(install_without_rocm)=

Install AMD SMI without ROCm

The following are example steps to install the AMD SMI libraries and CLI tool on Ubuntu 22.04.

  1. Install the library.

    sudo apt install amd-smi-lib
    
  2. Add the installation directory to your PATH. If installed with ROCm, ignore this step.

    export PATH="${PATH:+${PATH}:}~/opt/rocm/bin"
    
  3. Verify your installation.

    amd-smi --help
    

Optionally enable CLI autocompletion

The amd-smi CLI application supports autocompletion. If argcomplete is not installed and enabled already, do so using the following commands.

python3 -m pip install argcomplete
activate-global-python-argcomplete --user
# restart shell to enable

(install-manual-py-lib)=

Install the Python library for multiple ROCm instances

If {doc}multiple ROCm versions are installed <rocm-install-on-linux:install/native-install/multi-version-install> and you are not using pyenv, uninstall previous versions of AMD SMI before installing the desired version from your ROCm instance.

Manually install the Python library

The following are example AMD SMI installation steps on Ubuntu 22.04 without ROCm.

  1. Remove previous AMD SMI installation.

    python3 -m pip list | grep amd
    python3 -m pip uninstall amdsmi
    
  2. Install the AMD SMI Python library from your target ROCm instance.

    apt install amd-smi-lib
    cd /opt/rocm/share/amd_smi
    python3 -m pip install --upgrade pip
    python3 -m pip install --user .
    
  3. You should now have the AMD SMI Python library in your Python path:

    ~$ python3
    Python 3.8.10 (default, May 26 2023, 14:05:08)
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import amdsmi
    >>>