Building ROCdbgapi#
You can build the ROCdbgapi library on the following operating systems:
Ubuntu 18.04
Ubuntu 20.04
Centos 8.1
RHEL 8.1
SLES 15 Service Pack 1
To build the ROCdbgapi library, ensure your system includes the following prerequisites:
A C++17 compiler such as GCC 7 or Clang 5.
AMD Code Object Manager Library (ROCcomgr). Install this library (
libamd_comgr.so.1
) using thecomgr
package included in the AMD ROCm release.To enable AMD GPU debugging, load the ROCr library. Install this library (
libhsa-runtime64.so.1
) as part of the AMD ROCm release using thehsa-rocr-dev
package.ROCm CMake module. Install this module using the
rocm-cmake
package included in AMD ROCm.Add the given packages according to the OS:
apt install gcc g++ make cmake doxygen graphviz texlive-full
yum install -y gcc gcc-g++ make cmake doxygen graphviz texlive \
texlive-xtab texlive-multirow texlive-sectsty texlive-tocloft \
texlive-tabu texlive-adjustbox
zypper in gcc gcc-g++ make cmake doxygen graphviz texlive-scheme-medium \
texlive-hanging texlive-stackengine texlive-tocloft texlive-etoc \
texlive-tabu
Note
The doxygen
1.8.13 installed by Ubuntu 18.04 and doxygen
1.8.14 installed by CentOS 8.1 or RHEL 8.1 have a bug that prevents PDF creation. To avoid this issue, build doxygen
1.8.11 from source.
An example command line to build the ROCdbgapi library on Linux:
cd rocdbgapi
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install ..
make
You can specify the path using the CMAKE_INSTALL_PREFIX
parameter.
The built ROCdbgapi library is placed in:
build/include/amd-dbgapi.h
build/librocm-dbgapi.so*
Building documentation#
An example command line to generate the HTML and PDF library documentation:
make doc
The generated ROCdbgapi library documentation is placed in:
doc/html/index.html
doc/latex/refman.pdf
Installing ROCdbgapi#
To install the ROCdbgapi library and documentation, use:
make install
The installed ROCdbgapi library and documentation are 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
Running ROCdbgapi#
The ROCdbgapi library has an optional runtime dependency on the amdgpu.ids
database file, located in /opt/amdgpu/share/libdrm/amdgpu.ids
or /usr/share/libdrm/amdgpu.ids
.
The libdrm-amdgpu-common
ROCm package provides the /opt/amdgpu/share/libdrm/amdgpu.ids
database on all distributions.
The following packages provide /usr/share/libdrm/amdgpu.ids
:
SLES:
libdrm-amdgpu
RHEL:
libdrm
Debian and Ubuntu:
libdrm-common