Expand description
Profiling & Benchmarking — op-level timing, memory tracking, model summaries.
Structs§
- Benchmark
Result - Result of benchmarking a model’s forward pass.
- Memory
Tracker - Tracks tensor memory allocations for profiling.
- Model
Summary - Summary statistics for a model.
- Profile
Entry - Aggregated statistics for a single event name.
- Profile
Event - A single profiling event with a name, duration, and optional metadata.
- Profile
Report - A formatted profiling report, printed with
Display. - Profiler
- A lightweight profiler that collects named timing events.
- Scoped
Timer - An RAII timer guard. Drops into a profiler automatically.
- Stopwatch
- A simple stopwatch for manual timing.
Functions§
- benchmark_
forward - Benchmark a model’s forward pass.
- benchmark_
forward_ backward - Benchmark forward + backward pass.
- estimate_
model_ memory - Estimate the memory usage of a module’s parameters in bytes.
- format_
bytes - Format bytes into a human-readable string (B, KB, MB, GB).