Skip to main content

Module state

Module state 

Source
Expand description

Architecture-declared mutable state and concrete runtime realizations. Backend-neutral mutable model-state contracts.

Architectures declare state geometry through StateLayout. Runtime policies select a residency realization, while concrete backends retain their native layer-state and tensor types.

Structs§

ArchitectureStatePartitionPlan
Complete architecture-authored mutable-state partition policy.
ArchitectureStatePartitionRule
One architecture-authored rule in a mutable-state partition plan.
DeviceState
Fully device-resident state with one concrete value per architecture layer.
ModelStateIdentity
Architecture and placement identity used to derive persistence identity.
StateLayout
Complete ordered mutable-state geometry owned by one model instance.
StateSegmentId
Validated stable identity of one contiguous mutable-state segment.
StateSegmentSpec
One named contiguous range in an architecture’s state layout.

Enums§

ArchitectureStatePartitionError
Invalid architecture-authored mutable-state partition policy.
ArchitectureStatePlacement
Architecture-declared placement of one contiguous mutable-state range.
ArchitectureStateRealizationError
Failure while selecting and realizing architecture-authored mutable state.
StateError
Invalid architecture state geometry or runtime access.
StateSegmentLifetime
Lifetime policy attached to a named mutable-state segment.

Constants§

DEFAULT_STATE_SEGMENT_ID
Stable name assigned to the implicit segment of a simple state layout.

Traits§

ArchitectureStateFactory
Additive backend mechanism for realizing an architecture-declared state layout.
LayerRuntimeState
Optional capability for architectures with one indexed state per layer.
ResettableRuntimeLayerState
Reset capability for one concrete backend-native layer state.
ResettableRuntimeState
Named-segment reset supported by a concrete runtime-state realization.
RuntimeLayerState
Concrete layer state capable of exposing backend-native retained tensors.
RuntimeState
Mutable state realization consumed by generic resident and layerwise engines.
RuntimeStateComponents
Mutable access to architecture-declared fixed state components.

Functions§

realize_architecture_state
Selects the architecture’s exact state layout and realizes it through an explicitly supplied additive mechanism.