Profiling and Instrumentation

GPU profiling helps locate performance bottlenecks by connecting model operations, runtime activity, and hardware behavior. Choose a tool based on the level of the stack you need to inspect:

  • Model-level attribution: PyTorch Profiler captures PyTorch operators, CPU activity, and GPU kernels in a workload trace, helping identify a slow model layer or operation.

  • Hardware hotspot analysis: Intel® VTune™ Profiler analyzes GPU hotspots, execution-unit activity, memory bandwidth, occupancy, and stalls to diagnose hardware bottlenecks.

These tools provide complementary views: start with PyTorch Profiler to locate a slow operation, and use VTune to investigate hardware-level causes. Keep the workload and measurement conditions consistent when comparing results; profiler traces are for diagnosis, not benchmark measurements.