Aggregated timing summary for a single op name across many calls.
Produced by Profiler.key_averages, which buckets the recorded
OpEvent list by op name and exposes total time, average
time, call count, and cumulative FLOP estimate. This is the natural
object for a "top-k by self-time" performance report.
Parameters
namestrOp name shared by all events in the summary.
eventslist of OpEventRecorded events bucketed under
name.Notes
The average is computed as
where is the call count and is the per-call duration in microseconds.
Examples
>>> import lucid
>>> with lucid.profiler.profile() as prof:
... for _ in range(10):
... y = lucid.randn(64, 64) @ lucid.randn(64, 64)
>>> for summary in prof.key_averages()[:3]:
... print(summary)Used by 1
Constructors
1Properties
4Average time in microseconds per call.
Number of times this operation was called.
Total FLOPs across all calls.
Total time in microseconds across all calls.