File: build.rst

package info (click to toggle)
rocminfo 6.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 320 kB
  • sloc: cpp: 980; python: 205; sh: 40; makefile: 9
file content (49 lines) | stat: -rw-r--r-- 1,943 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.. meta::
  :description: Install ROCmInfo
  :keywords: install, rocminfo, AMD, ROCm


Building ROCmInfo
*****************

Use the standard cmake build procedure to build ROCmInfo. The location of ROCm root (parent directory containing ROCM headers and libraries) must be provided
as a CMake argument using the standard CMAKE_PREFIX_PATH CMake variable.

After cloning the ROCmInfo git repo, you must perform a `git-fetch --tags` to get the tags residing on the repo. These tags are used for versioning.

For example,

.. code-block::

    $ git fetch --tags origin
    
    Building from the CMakeLists.txt directory might look like this:
    
    mkdir -p build
    
    cd build
    
    cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
    
    make
    
    cd ..

Upon a successful build, the binary, ROCmInfo, and the Python script, rocm_agent_enumerator, will be in the `build` folder.

ROCmInfo execution
-------------------

"rocminfo" gives information about the HSA system attributes and agents.

"rocm_agent_enumerator" prints the list of available AMD GCN ISA or architecture names. With the option '-name', it prints out available architectures names obtained from ROCmInfo. Otherwise, it generates ISA in one of five different ways:

1. ROCM_TARGET_LST : a user defined environment variable, set to the path and filename where to find the "target.lst" file. This can be used in an install environment with sandbox, where execution of "rocminfo" is not possible.

2. target.lst : user-supplied text file, in the same folder as "rocm_agent_enumerator". This is used in a container setting where ROCm stack may usually not available.

3. HSA topology : gathers the information from the HSA node topology in /sys/class/kfd/kfd/topology/nodes/

4. lspci : enumerate PCI bus and locate supported devices from a hard-coded lookup table.

5. ROCmInfo : a tool shipped with this script to enumerate GPU agents available on a working ROCm stack.