Installing ROCProfiler#
As ROCProfiler library and rocprof
are included as standard components of the ROCm distribution, the easiest installation method is to perform a complete ROCm installation as described in Installation Guide. This approach is straightforward and dependable, making it suitable for most users.
Alternatively, installing ROCProfiler from the source files offers some advantages. Due to the additional complexity involved, this option is only recommended for experienced users when necessary.
Supported AMD GPU architectures#
The following AMD GPU architectures are supported for ROCProfiler:
gfx8 (Fiji/Ellesmere)
gfx900 (AMD Vega 10)
gfx906 (AMD Vega 7nm also referred to as AMD Vega 20)
gfx908 (AMD Instinct™ MI100 accelerator)
gfx90a (AMD Instinct MI200)
gfx94x (AMD Instinct MI300)
Installing from source files#
The following section discusses how to install and build from the source files.
Prerequisites#
Installing ROCProfiler from the source requires:
AMD GPU driver for supported GPUs
Linux system supported by ROCm as described in System requirements
ROCm installed in the system
Packages necessary for ROCProfiler on supported Linux distributions as described in the following:
sudo apt install libudev-dev libnuma1 libnuma-dev Python3 python3-pip gcc g++ make cmake doxygen
RHEL 8.6 and 9.2:
yum install -y systemd-devel numactl numactl-devel Python3 python3-pip gcc gcc-g++ make cmake libatomic doxygen
CentOS 7:
yum install -y systemd-devel numactl numactl-devel Python3 python3-pip gcc gcc-g++ make cmake libatomic doxygen
SLES 15.3:
zypper in libudev-devel libnuma1 libnuma-devel Python3 python3-pip gcc gcc-g++ make cmake libatomic doxygen
SLES Tumbleweed:
zypper install systemd-devel libnuma1 libnuma-devel Python3 python3-pip gcc gcc-g++ make cmake libatomic doxygen
Python libraries such as
CppHeaderParser
,argparse
, andsqlite3
. To install the libraries based on the default Python installation on the system, use:
pip3 install cppheaderparser argparse sqlite3
Building from source#
With the dependencies installed, build ROCProfiler from the source code using the following steps:
After cloning the repository, use
CMake
to compile and install ROCProfiler. To useCMake
, set the environment variable:export CMAKE_PREFIX_PATH=/opt/rocm/include/hsa:/opt/rocm
Then, build ROCProfiler with a premade bash script.
./build.sh
You now have two options for utilizing the newly built ROCProfiler and its associated libraries.
The first option involves setting an environment variable to indicate the location of the executable and libraries. This enables the system to use the new
rocprof
and related libraries instead of the default version.export LD_LIBRARY_PATH=<BUILD_LOCATION>:$LD_LIBRARY_PATH export PATH=<BUILD_LOCATION>/bin:$PATH
A second option is to specify the desired location for the installation of the executable and libraries if you don’t want the installation process to move the executable and libraries to the default location. To specify the installation location, set the environment variable:
export CMAKE_INSTALL_PREFIX=<LOCAL INSTALL FOLDER>
To install
rocprof
in the build directory, run:cd build make install
Note
The Makefile is generated by
CMake
.