stormlog.infer.trace_ranges
Name iteration ranges so a trace importer can link GPU work to iterations.
An engine wraps the CPU code that launches one iteration’s GPU work in a
profiler range named stormlog.iteration/<producer_id>/<iteration_id>.
CUPTI ties every kernel, copy, and memset to the CPU call that launched it,
and that call sits inside the range on the same thread. A trace importer can
therefore link GPU work to an iteration without comparing GPU and CPU clocks.
Functions
|
Mark one iteration's launches for PyTorch profiler and, optionally, NVTX. |
|
Return the range name for one iteration of one producer. |
|
Return the iteration a range name refers to, or None for other ranges. |
- stormlog.infer.trace_ranges.iteration_range(producer_id, iteration_id, *, nvtx=False)[source]
Mark one iteration’s launches for PyTorch profiler and, optionally, NVTX.
Without PyTorch the range is a no-op.
record_functioncosts little when no profiler is active. NVTX ranges are opt-in because they are always emitted, profiler or not.- Parameters:
producer_id (str)
iteration_id (str)
nvtx (bool)
- Return type:
Iterator[None]