A single recorded operation event captured by the profiler.
Each OpEvent corresponds to one C++ engine op invocation: name,
wall-clock duration, output tensor shape, an FLOP estimate, and the
net memory delta. Profilers expose lists of these events so that
per-op cost can be aggregated, exported, and visualised.
Parameters
implobjectUnderlying engine
OpEvent handle returned from the C++
profiler.Notes
Durations are reported in nanoseconds at the source; helper properties expose the same value in microseconds and milliseconds for convenience.
Examples
>>> import lucid
>>> with lucid.profiler.profile() as prof:
... y = lucid.randn(64, 64) @ lucid.randn(64, 64)
>>> for ev in prof.events():
... print(ev.name, ev.time_us)Used by 1
Constructors
1Properties
7Estimated FLOPs for this operation.
Net memory allocated by this operation in bytes.
Operation name (e.g. 'matmul', 'add').
Output tensor shape.
Wall-clock duration in milliseconds.
Wall-clock duration of the operation in nanoseconds.
Wall-clock duration in microseconds.