Record of a single op execution captured by OpScope.
Each event is a snapshot of one dispatched op: its name, the device and dtype it ran on, the output shape, the wall-clock duration, the net memory delta, and an optional FLOP estimate. Profilers store vectors of these records and expose them to the Python layer for trace export (Chrome / Perfetto) and aggregated summaries.
Attributes
namestd::stringOp name as recorded at OpScope construction (typically the schema name, e.g.
"matmul", "conv2d").deviceDeviceDevice on which the op executed.
dtypeDtypeElement dtype of the output tensor at OpScope construction time.
shapeShapeOutput tensor shape at OpScope construction time.
time_nsint64_tWall-clock duration from OpScope construction to destruction, in nanoseconds.
memory_delta_bytesint64_tChange in
MemoryTracker::current_bytes for device across the scope. May be negative when the op frees more memory than it allocates (e.g. in-place ops releasing temporaries).flopsint64_tEstimated floating-point operation count, populated by
OpScope::set_flops. Defaults to 0 when the op does not report a count.Notes
All fields are owned by value; the struct is freely copyable and
suitable for return from Profiler::events.