Inference Profiling
Introduction
Profiling offers deep insights into function and kernel performance, including CPU time and memory usage. Profilers are essential for identifying and optimizing bottlenecks, detecting configuration issues, and reducing Mean Time to Resolution (MTTR). Graphsignal captures profiles at the trace level to enable precise performance analysis. While each profile is recorded during a single trace, it reflects aggregated, process-level activity.
The following profiles are currently supported:
profile.cpython
- Python wall-time profile recorded using cProfile.profile.pytorch
- Set of PyTorch profiles recorded using PyTorch Profiler profiler.
Configuring profiling
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 with the list of profiles to record, if applicable.
See Python API documentation for more information.