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.

Source facts for AMD Introduces PC Sampling for GPU Profiling in ROCprofiler-SDK: This is where PC Sampling becomes especially valuable. PC Sampling helps bridge the gap between high-level performance counters and the actual instructions executing on the GPU. This makes PC Sampling a powerful tool for developers working on performance-critical GPU applications, libraries, and frameworks.
Original AINewsTrend explainer based on the cited source. This graphic summarizes source statements; it is not an independent benchmark.

Sources and further reading

  1. amd: Beyond Counters: Instruction-Level GPU Hotspot Profiling with PC Sampling in ROCprofiler-SDK