IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

GpuStatsRecorder

GpuStatsRecorder​

class max.profiler.gpu.GpuStatsRecorder(*args, **kwargs)

source

Bases: Protocol

Shared contract for a background GPU-stats sampler.

Both the local BackgroundRecorder (subprocess NVML/ROCm-SMI) and the benchmark’s remote DCGM scraper implement this: each samples while inside its context manager and exposes a stats time series of per-GPU snapshots once recording has finished. It lives here, not in the benchmark package, so the profiler can declare it without depending on benchmark (benchmark depends on profiler, never the reverse).

stats​

property stats: list[dict[str, GPUStats]]

source

Time series of per-GPU snapshots, once recording has finished.