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

BatchContext

BatchContext​

class max.nn.graph_groups.BatchContext(*args, **kwargs)

source

Bases: GraphGroup[str, tuple[TensorType, …]]

Per-device host scalars summarizing the batch’s context lengths.

Parameters:

Return type:

Self

kind​

kind: ClassVar[str | None] = 'batch_context'

source

Identifies the feature wherever the group sits in a tree.