pub fn prepare_partitioned_session_runtime<A, B, R, S, G, W, E, F>(
architecture: A,
selected: SelectedReplicatedTextRealization,
partition: ArchitecturePartition<G, W>,
communication: CommunicationManifest,
expected_tasks: Option<&[ReplicatedTextMaterializationTask]>,
topology: PromptCacheTopology,
output_selection: ReplicatedTextOutputSelection,
context: &<B::Tensor as Tensor>::Context,
factory: F,
) -> Result<PreparedPartitionedSessionRuntime<R, S>, PartitionedSessionPreparationError<E>>where
B: NeuralBackend,
S: RuntimeState<B>,
A: LayeredArchitecture<B, S>,
A::Error: Display,
F: FnOnce(PartitionedSessionFactoryInput<A, G, W>, &SelectedReplicatedTextRealization, &<B::Tensor as Tensor>::Context) -> Result<(R, S), E>,Expand description
Consumes exact architecture authority into a rank-local runtime and state.
The selected realization, architecture, partition, communication manifest, and optional architecture-precomputed task proof are consumed in one operation. Payload work is re-derived from the consumed architecture and partition before the factory runs. A task proof, when supplied, must match that derivation exactly. The factory therefore cannot be paired with a different architecture after admission.