Rocprofiler
rocprofiler is the profiler utility for GPGPU programs written in HIP.
Installation
dev-util/rocprofiler pulls HIP toolchain (provided by dev-util/hip) along with profiling/tracing libraries, headers, and scripts.
Emerge
Install dev-util/rocprofiler:
root #
emerge --ask dev-util/rocprofiler
Usage
Detailed usage can be found in rocprof document.
Profiling
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.
Gentoo has stripped out the proprietary AQL profiler library. AQL may refer to architected queuing language or asynchronous queuing language.
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
- AMD ROCProfiler User Guide v5.1 – The official user guide