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
RealizationState
RealizationStateβ
class max.experimental.tensor.RealizationState(values, ctx)
Bases: object
State for an unrealized tensor.
values is always a tuple of GraphValue β one entry for an
unsharded tensor, N entries (one per shard) for a sharded tensor.
All values live in the same graph and realization context, which
guarantees atomic realization: all shards compile and execute together.
See RealizationContext.
-
Parameters:
-
- values (tuple[BufferValue | TensorValue, ...])
- ctx (RealizationContext)
ctxβ
ctx: RealizationContext
The realization context used to create this tensor. This context is responsible for realizing the tensor to a real value.
num_valuesβ
property num_values: int
Returns the number of graph values (1 for unsharded, N for sharded).
valueβ
property value: BufferValue | TensorValue
Returns the single graph value. Raises if this is a sharded state.
valuesβ
values: tuple[BufferValue | TensorValue, ...]
The symbolic value(s) representing the computation backing this tensor. Always a tuple: length-1 for unsharded, length-N for sharded.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!