From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

rocprofiler is the profiler utility for GPGPU programs written in HIP.


dev-util/rocprofiler pulls HIP toolchain (provided by dev-util/hip) along with profiling/tracing libraries, headers, and scripts.


Install dev-util/rocprofiler:

root #emerge --ask dev-util/rocprofiler


Detailed usage can be found in rocprof document.


To simply profile GPU kernels in a program, run the following command:

user $rocprof <program-to-be-profiled>

This will generate a results.csv containing execution duration of kernels.

To simply trace a program, collecting HIP/HSA API calls and kernel execution details, run the following command:

user $rocprof --sys-trace <program-to-be-profiled>

This will further generates results.json, which is a standard trace file.

Full command line arguments can be viewed by running rocprof --help.

Viewing results

There are various viewers, including Chromium and perfetto.

Using chrome://tracing to load and view trace files should be the simplest method, and does not require network.

Note that Debian has stripped the tracing [1] of its chromium package.

External resources