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

PipelineStage

PipelineStage​

class max.pipelines.lib.pipeline_parallel.PipelineStage(index, num_stages, layers, boundary_types=None, trace_only=False)

source

Bases: object

One stage of a decoder cut into pipeline stages.

Parameters:

boundary_types​

boundary_types: object = None

source

The types of what the previous stage’s decoder returns, in the tree it returns them, or None on the first stage.

index​

index: int

source

The stage’s position in the pipeline, from zero.

is_first​

property is_first: bool

source

Whether the stage takes the model’s inputs rather than a cut’s.

is_last​

property is_last: bool

source

Whether the stage returns the model’s outputs rather than a cut’s.

layers​

layers: range

source

The decoder layers the stage builds.

num_stages​

num_stages: int

source

The number of stages in the pipeline.

trace_only​

trace_only: bool = False

source

Whether the build ends with StageTraced once the stage knows what it hands the next, before anything compiles. An exporter traces the stages before the one it builds, to learn that stage’s boundary types.