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!