What changed
AMD has introduced PC sampling in the ROCprofiler-SDK, part of its ROCm™ software stack (version 6.4 and later). This feature provides instruction-level visibility into GPU hotspots on precompiled binaries, allowing developers to identify performance costs without recompiling or manually instrumenting kernels.
What this means in practice
PC sampling helps developers understand where time is being spent in GPU code and why waves are stalling. It offers two methods: software-based (host-trap) and hardware-based (stochastic). The software-based method is available on AMD Instinct™ MI200 series accelerators and later, while the hardware-based method is available on AMD CDNA™ 3, 4, and 5 architectures, including the MI300, MI325, MI350, and MI455X series.
The feature enables developers to analyze stalls, such as WAITCNT, barrier waits, and issue arbitration, and to optimize code without requiring source changes or recompilation.
A worked GEMM example in the blog post demonstrates how PC sampling can identify a fetch-bound pattern on uncoalesced global loads, leading to an LDS-tiling fix that improved performance by ~3.0× on an AMD Instinct MI300A with ROCm rocm-10.1.0.
Limitations and availability
PC sampling is available on AMD CDNA 3 and 4 architectures (gfx942/gfx950) and extends to CDNA 5 (including the MI455X). The examples in the blog post do not cover CDNA 5. The feature complements other profiling tools like kernel-trace, performance monitoring counters (PMC), and Advanced Thread Trace (ATT), rather than replacing them. Developers must build applications with debug symbols (-g) to map sampled program counters back to source lines. Without debug symbols, samples are reported as dropped counts and excluded from aggregations.
