xlnstorch.benchmark.BenchResult#
- class xlnstorch.benchmark.BenchResult(prof, wall_ms, p50, p90, p99, cpu_us=0.0, cpu_mem_mb=0.0, cuda_us=0.0, cuda_mem_mb=0.0)#
A container holding the aggregate numbers of a single benchmark run.
- Parameters:
- prof#
The profiler output, if profiling was enabled. Otherwise
None.- Type:
Optional[torch.profiler.profile]
- p50 / p90 / p99
Percentiles (ms) of the wall-clock distribution.
- Type:
- cpu_us / cuda_us
Self CPU / CUDA time reported by torch.profiler in micro-seconds. Values are zero when
profile=Falseor the respective device is unavailable.- Type:
- cpu_mem_mb / cuda_mem_mb
Peak memory (mb) reported by torch.profiler. Same fallback rules as above apply.
- Type:
- __init__(prof, wall_ms, p50, p90, p99, cpu_us=0.0, cpu_mem_mb=0.0, cuda_us=0.0, cuda_mem_mb=0.0)#
Methods
__init__(prof, wall_ms, p50, p90, p99[, ...])print()Nicely format the dataclass to stdout (monospaced columns).
save_full_profile(path[, group_by_stack_n, ...])Attributes