IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Python class

ProfilingConfig

ProfilingConfig​

class max.pipelines.ProfilingConfig(*, config_file=None, section_name=None, gpu_profiling='off', profiling_enabled=False, profiling_output_path=None, profiling_dynolog_enabled=True, profiling_warmup_steps=0, profiling_active_steps=10, profiling_periodic_flush_seconds=60)

source

Bases: ConfigFileModel

Configuration for the GPU (NVTX/Nsight) and libkineto/HTA profilers.

Parameters:

  • config_file (str | None)
  • section_name (str | None)
  • gpu_profiling (Literal['off', 'on', 'detailed'])
  • profiling_enabled (bool)
  • profiling_output_path (str | None)
  • profiling_dynolog_enabled (bool)
  • profiling_warmup_steps (int)
  • profiling_active_steps (int)
  • profiling_periodic_flush_seconds (int)

gpu_profiling​

gpu_profiling: GPUProfilingMode

source

Whether to enable GPU profiling of the model.

model_config​

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'strict': False}

source

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init()​

model_post_init(context, /)

source

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:

  • self (BaseModel) – The BaseModel instance.
  • context (Any) – The context.

Return type:

None

profiling_active_steps​

profiling_active_steps: int

source

Reserved; step-windowed capture is not yet implemented.

profiling_dynolog_enabled​

profiling_dynolog_enabled: bool

source

Whether the Dynolog IPC listener is active. On by default.

profiling_enabled​

profiling_enabled: bool

source

Master switch for the libkineto-backed profiler.

profiling_output_path​

profiling_output_path: str | None

source

Trace output path; file or directory.

profiling_periodic_flush_seconds​

profiling_periodic_flush_seconds: int

source

Crash-safe flush cadence.

profiling_warmup_steps​

profiling_warmup_steps: int

source

Reserved; step-windowed capture is not yet implemented.