Inference Profiling
Introduction
Profiling provides deep insights into function and kernel performance, such as CPU time and memory usage. Profilers are essential for identifying and optimizing bottlenecks, detecting configuration issues, and reducing Mean Time to Resolution (MTTR). Graphsignal records profiles at the single-trace level for precise performance analysis.
Integration
See the Quick Start for instructions on installing and configuring the Graphsignal tracer.
Profiling is enabled automatically for manually traced operations and auto-traced libraries, if supported. The fraction of profiled operations is controlled via the profiling_rate
parameter in the configure()
method. To disable profiling, set profiling_rate
to 0. To profile every operation, set it to 1.
To control which profiles are recorded, add include_profiles=[...]
to the configure()
or trace()
call. Currently supported profiles are: python-time-profile
, pytorch-cpu-profile
, pytorch-kernel-profile
, and pytorch-timeline
.
See Python API documentation for more information.