Files
TheRock/rocm-systems/projects/rocminfo/docs/install/build.rst
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

62 lines
2.3 KiB
ReStructuredText

.. meta::
:description: Install rocminfo
:keywords: install, rocminfo, AMD, ROCm
**************************
Build rocminfo from source
**************************
To build rocminfo as part of the ROCm Core SDK, see `TheRock build
instructions
<https://github.com/ROCm/TheRock/blob/main/docs/development/README.md>`__.
TheRock is the recommended way to build ROCm components from source.
Alternatively, you can build rocminfo standalone using the following
instructions.
Build rocminfo using CMake
==========================
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.
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.
For example:
.. code-block:: bash
$ git fetch --tags origin
Building from the CMakeLists.txt directory might look like this:
.. code-block:: bash
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
make
cd ..
Upon a successful build, the rocminfo binary and the Python script ``rocm_agent_enumerator`` will present in the ``build`` directory.
rocminfo execution
==================
rocminfo reports information about HSA system attributes and agents.
``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:
* ``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.
* ``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.
* HSA topology: Gathers information from the HSA node topology under ``/sys/class/kfd/kfd/topology/nodes/``.
* ``lspci``: Enumerates the PCI bus and locates supported devices from a hard-coded lookup table.
* rocminfo: A tool shipped with this script to enumerate GPU agents available on a working ROCm stack.