rocprofiler-pc-sampling

Installation
SKILL.md

PC Sampling

Prerequisites

  • The system must have a ROCm installation and an accessible AMD GPU; that is, amd-smi should return at least one valid device.
  • The GPU must support PC sampling. Available PC sampling configurations can be determined via rocprofv3-avail info --pc-sampling or rocprofv3 -L. Your sampling method and interval must align with the outputs of this command. Also pay attention to any flags reported for a given configuration; at time of writing, stochastic sampling intervals must be powers of two.
  • The application should be built with debug symbols AND optimization flags (e.g. -g -O3) in order to get source line attribution and a representative execution profile.

How to use PC Sampling

To run rocprofv3 with PC sampling:

  • explicitly enable pc sampling with the flag --pc-sampling-beta-enabled.
  • specify the pc sampling method with --pc-sampling-method: host_trap or stochastic
  • specify the interval unit for the sampling with --pc-sampling-unit: time for host_trap and cycles for stochastic
  • specify the sampling interval with --pc-sampling-interval: an integer representing microseconds if you specified time or cycles if you specified cycles.
  • add the --kernel-trace flag to track kernel launches for attribution
  • specify either the json or csv output format with --output-format; the default output format, rocpd, does not currently support PC sampling output.
Installs
367
Repository
amd/skills
GitHub Stars
481
First Seen
Oct 19, 2026