In this article
Choose profiling evidence by the question: sampling locates recurring states, counters aggregate events, and instrumentation can change the observed execution.
GPU profiling uses several observation mechanisms, including periodic sampling, hardware counters, event tracing, and injected instrumentation. They answer different questions and impose different costs. A sample distribution is not a complete instruction history, and an instrumented execution is not automatically identical to ordinary execution. Good analysis begins by identifying what the selected observation method can actually establish.
Sampling observes selected moments
A sampler records a subset of execution states at selected intervals or events. Frequently observed locations can indicate where execution spends time, but short phases may receive few samples or none. Sampling frequency and workload duration affect interpretation. Avoid converting a sparse sample count into an exact per-request latency claim. Repeat a representative workload long enough to obtain useful evidence while preserving the behavior the application actually has.
Primary reference: Nsight Compute Profiling Guide.
Counters aggregate a defined event
A hardware counter measures a documented event or quantity over a collection interval. Its denominator, scope, and normalization determine what a derived percentage means. A high value may describe activity rather than useful progress. Read the metric definition before comparing kernels. Two similarly named metrics can refer to different units or scopes, and a ratio across replayed passes may need assumptions about repeatable application behavior.
Primary reference: NVTX: NVIDIA Tools Extension Library.
Instrumentation creates additional work
Inserted measurement code can add instructions, memory traffic, or synchronization. It can also alter register allocation and scheduling. These effects are especially important for very short kernels or timing-sensitive concurrency. Compare ordinary execution timing with the profiled run and select a narrow collection scope. A detailed trace is valuable when it explains a mechanism, but its total wall-clock duration should not casually replace an uninstrumented performance measurement.
Primary reference: Nsight Systems User Guide.
Start from a system-level question
If the GPU is idle between kernels, a detailed arithmetic metric inside one kernel may not explain the application slowdown. A timeline can first reveal host preparation, dependency waits, or transfers. Once a costly kernel is identified, targeted counters or instruction-level sampling can investigate its cause. This progression keeps observation costs proportional to the unresolved question and reduces the temptation to collect every available metric without an interpretation plan.
Triangulate rather than trust one percentage
A convincing diagnosis connects ordinary completion time, the execution timeline, and a small set of relevant metrics. Change one mechanism and verify both the predicted metric response and the application result. If only the profiler percentage improves, the proposed explanation remains incomplete. Record tool version, collection mode, workload phase, and any replay behavior. These details allow another engineer to distinguish a real workload change from a change in how it was observed.
Related reading: A GPU inference benchmark you can trust; Reproducible inference stacks: preserving a GPU pilot’s result.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.