stormlog.infer.vllm_execution_devices
Map a profiler trace to the GPU it ran on, from the vLLM hook’s worker hellos.
Each worker epoch’s hello names the worker’s host, pid, CUDA ordinal and
GPU UUID (docs/vllm_execution.md). A trace names its host and launching
pids and spans a wall-clock window, so a worker epoch that was alive on that
host, with that pid, across that window is the process that wrote it: its
UUID is the trace’s device. A pid that no epoch covers, or that several do,
is left for --device-uuid.
Functions
|
The wall-clock span of a trace's launches and GPU events, if any. |
Classes
|
The GPU UUIDs a trace's processes map to, and what could not be mapped. |
|
One worker process lifetime, as its hello and liveness records say. |
|
Every worker epoch of a hook directory, ready to bind traces. |
- class stormlog.infer.vllm_execution_devices.TraceBinding(status, uuids=<factory>, workers=<factory>, ambiguous=<factory>, unmatched=<factory>)[source]
Bases:
objectThe GPU UUIDs a trace’s processes map to, and what could not be mapped.
- Parameters:
status (str)
uuids (dict[int, dict[int, str]])
workers (dict[int, str])
ambiguous (dict[int, list[str]])
unmatched (list[int])
- status: str
- uuids: dict[int, dict[int, str]]
- workers: dict[int, str]
- ambiguous: dict[int, list[str]]
- unmatched: list[int]
- class stormlog.infer.vllm_execution_devices.WorkerEpoch(epoch, host, boot_id, pid, engine_producer, cuda_ordinal, device_uuid, local_rank, rank, trace_rank_suffix, enabled, refused, started_wall_ns, last_seen_wall_ns, ended)[source]
Bases:
objectOne worker process lifetime, as its hello and liveness records say.
- Parameters:
epoch (str)
host (str)
boot_id (str | None)
pid (int)
engine_producer (str | None)
cuda_ordinal (int | None)
device_uuid (str | None)
local_rank (int | None)
rank (dict[str, int])
trace_rank_suffix (str | None)
enabled (bool)
refused (str | None)
started_wall_ns (int | None)
last_seen_wall_ns (int | None)
ended (bool)
- epoch: str
- host: str
- boot_id: str | None
- pid: int
- engine_producer: str | None
- cuda_ordinal: int | None
- device_uuid: str | None
- local_rank: int | None
- rank: dict[str, int]
- trace_rank_suffix: str | None
- enabled: bool
- refused: str | None
- started_wall_ns: int | None
- last_seen_wall_ns: int | None
- ended: bool
- class stormlog.infer.vllm_execution_devices.WorkerIndex(workers, directory=None)[source]
Bases:
objectEvery worker epoch of a hook directory, ready to bind traces.
- Parameters:
workers (Sequence[WorkerEpoch])
directory (Path | None)
- classmethod from_directory(directory, *, importer=None)[source]
- Parameters:
directory (str | Path)
importer (Importer | None)
- Return type:
- bind_trace(trace)[source]
Bind a loaded trace by its host, launching pids and time window.
- Parameters:
trace (KinetoTrace)
- Return type:
- stormlog.infer.vllm_execution_devices.trace_wall_window(trace)[source]
The wall-clock span of a trace’s launches and GPU events, if any.
- Parameters:
trace (KinetoTrace)
- Return type:
tuple[int, int] | None