This page contains changes for a test release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

Building AMD Debugger API library

Building AMD Debugger API library#

Users can build the ROCdbgapi library on the following environments:

  • Ubuntu 18.04

  • Ubuntu 20.04

  • Centos 8.1

  • RHEL 8.1

  • SLES 15 Service Pack 1

Building the ROCdbgapi library requires the following prerequisites:

  • A C++17 compiler such as GCC 7 or Clang 5.

  • AMD Code Object Manager Library (ROCcomgr). Install this library using the comgr package included in AMD ROCm.

  • ROCm CMake module. Install this module using the rocm-cmake package included in AMD ROCm.

  • For Ubuntu 18.04 and Ubuntu 20.04 the following are the required packages:

    apt install gcc g++ make cmake doxygen graphviz texlive-full pci.ids
    

    Note

    The doxygen 1.8.13 that is installed by Ubuntu 18.04 has a bug that prevents the PDF from being created. doxygen 1.8.11 can be built from source to avoid the issue.

  • For CentOS 8.1 and RHEL 8.1 the following adds the needed packages:

    yum install -y gcc gcc-g++ make cmake doxygen graphviz texlive \
    texlive-xtab texlive-multirow texlive-sectsty texlive-tocloft \
    texlive-tabu texlive-adjustbox hwdata
    

    Note

    The doxygen 1.8.14 that is installed by CentOS 8.1 and RHEL 8.1 has a bug that prevents the PDF from being created. doxygen 1.8.11 can be built from source to avoid the issue.

  • For SLES 15 Service Pack 15, the following instructions add the required packages:

    zypper in gcc gcc-g++ make cmake doxygen graphviz texlive-scheme-medium \
    texlive-hanging texlive-stackengine texlive-tocloft texlive-etoc \
    texlive-tabu hwdata
    

An example command-line to build the ROCdbgapi library on Linux is:

cd rocdbgapi
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install ..
make

Specify a path using the CMAKE_INSTALL_PREFIX parameter.

The built ROCdbgapi library will be placed in:

  • build/include/amd-dbgapi.h

  • build/librocm-dbgapi.so*

An example command-line to generate the HTML and PDF library documentation is:

make doc

The generated ROCdbgapi library documentation is put in:

  • doc/html/index.html

  • doc/latex/refman.pdf

To install the ROCdbgapi library and documentation, use the following command:

make install

The installed ROCdbgapi library and documentation will be placed in:

  • ../install/include/amd-dbgapi.h

  • ../install/lib/librocm-dbgapi.so*

  • ../install/share/amd-dbgapi/LICENSE.txt

  • ../install/share/amd-dbgapi/README.md

  • ../install/share/html/amd-dbgapi/index.html

  • ../install/share/doc/amd-dbgapi/amd-dbgapi.pdf

To use the ROCdbgapi library, the comgr library must be installed. This can be installed as part of the AMD ROCm release by the comgr package:

  • libamd_comgr.so.1

The ROCdbgapi library requires that the ROCr library is loaded in the inferior to enable AMD GPU debugging. This can be installed as part of the AMD ROCm release by the hsa-rocr-dev package:

  • libhsa-runtime64.so.1