Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.9 KiB
ReStructuredText
Raw Permalink Normal View History

2024-05-15 14:10:38 -07:00
.. meta::
:description: Install rocminfo
2024-05-15 14:10:38 -07:00
:keywords: install, rocminfo, AMD, ROCm
2024-05-15 12:36:33 -07:00
Building rocminfo
2024-05-15 12:36:33 -07:00
*****************
Use the standard CMake build procedure to build rocminfo. The ROCm root directory (the parent directory containing ROCM headers and libraries) must be provided as a CMake argument using the standard ``CMAKE_PREFIX_PATH`` variable.
2024-05-15 12:36:33 -07:00
After cloning the `rocminfo Git repository <https://github.com/ROCm/rocm-systems/tree/develop/projects/rocminfo>`_, run ``git-fetch --tags`` to retrieve the repository tags, which are used for versioning.
2024-05-15 12:36:33 -07:00
For example:
2024-05-15 12:36:33 -07:00
.. code-block::
$ git fetch --tags origin
2024-05-15 12:36:33 -07:00
Building from the CMakeLists.txt directory might look like this:
2024-05-15 12:36:33 -07:00
mkdir -p build
2024-05-15 12:36:33 -07:00
cd build
2024-05-15 12:36:33 -07:00
cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
2024-05-15 12:36:33 -07:00
make
2024-05-15 12:36:33 -07:00
cd ..
Upon a successful build, the rocminfo binary and the Python script ``rocm_agent_enumerator`` will present in the ``build`` directory.
2024-05-15 12:55:05 -07:00
rocminfo execution
2024-05-15 12:55:05 -07:00
-------------------
rocminfo reports information about HSA system attributes and agents.
2024-05-15 12:55:05 -07:00
``rocm_agent_enumerator`` prints a list of AMD GCN ISA or architecture names. With the option ``-name``, it prints out the available architecture names obtained from rocminfo. Otherwise, it generates the ISA in one of the following ways:
2024-05-15 12:55:05 -07:00
* ``ROCM_TARGET_LST``: A user-defined environment variable that specifies the path to the ``target.lst`` file. This can be used in a sandboxed install environment where executing rocminfo is not possible.
2024-05-15 12:55:05 -07:00
* ``target.lst``: A user-supplied text file in the same folder as ``rocm_agent_enumerator``. This can be used in a container environment where the ROCm stack is not available.
2024-05-15 12:55:05 -07:00
* HSA topology: Gathers information from the HSA node topology under ``/sys/class/kfd/kfd/topology/nodes/``.
2024-05-15 12:55:05 -07:00
* ``lspci``: Enumerates the PCI bus and locates supported devices from a hard-coded lookup table.
2024-05-15 12:55:05 -07:00
* rocminfo: A tool shipped with this script to enumerate GPU agents available on a working ROCm stack.