pub struct PartitionedTextExecution<E, G, R, I, T, U, V>(/* private fields */);Expand description
Stateless strategy marker selecting PartitionedTextRuntime in the shared session.
Implementations§
Source§impl<E, G, R, I, T, U, V> PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> PartitionedTextExecution<E, G, R, I, T, U, V>
Trait Implementations§
Source§impl<E, G, R, I, T, U, V> Default for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> Default for PartitionedTextExecution<E, G, R, I, T, U, V>
Source§impl<A, B, S, Resident, Bounded, E, G, R, I, T, U, V> ReplicatedTextExecutionStrategy<A, B, S, Resident, Bounded> for PartitionedTextExecution<E, G, R, I, T, U, V>where
B: CommunicationBackend,
S: RuntimeState<B>,
A: LayeredArchitecture<B, S>,
Resident: LayerwisePolicy<B, A::Unit>,
Bounded: LayerwisePolicy<B, A::Unit, Error = Resident::Error>,
E: PartitionedGroupExecutor<A, B, S, G, R, I>,
G: Borrow<B::CommunicationGroup>,
R: Borrow<B::CommunicationRoute>,
I: CommunicationTensorMetadata<B>,
T: PartitionBoundaryTransport<B, G, R, I>,
U: PartitionOutputPublisher<B, G, R, I>,
V: PartitionCommitAgreement<B, G, R, I>,
A::Error: Display,
Resident::Error: Display,
impl<A, B, S, Resident, Bounded, E, G, R, I, T, U, V> ReplicatedTextExecutionStrategy<A, B, S, Resident, Bounded> for PartitionedTextExecution<E, G, R, I, T, U, V>where
B: CommunicationBackend,
S: RuntimeState<B>,
A: LayeredArchitecture<B, S>,
Resident: LayerwisePolicy<B, A::Unit>,
Bounded: LayerwisePolicy<B, A::Unit, Error = Resident::Error>,
E: PartitionedGroupExecutor<A, B, S, G, R, I>,
G: Borrow<B::CommunicationGroup>,
R: Borrow<B::CommunicationRoute>,
I: CommunicationTensorMetadata<B>,
T: PartitionBoundaryTransport<B, G, R, I>,
U: PartitionOutputPublisher<B, G, R, I>,
V: PartitionCommitAgreement<B, G, R, I>,
A::Error: Display,
Resident::Error: Display,
Source§const PARTITIONED_SESSION: bool = true
const PARTITIONED_SESSION: bool = true
Whether this strategy executes one rank of a partitioned session.
Source§const DISTRIBUTED_PHASE_AGREEMENT: bool = V::PHASE_FAILURE_AGREEMENT
const DISTRIBUTED_PHASE_AGREEMENT: bool = V::PHASE_FAILURE_AGREEMENT
Whether control phases use a selected bounded all-rank agreement.
Source§type Runtime = PartitionedTextRuntime<A, B, S, Bounded, E, G, R, I, T, U, V>
type Runtime = PartitionedTextRuntime<A, B, S, Bounded, E, G, R, I, T, U, V>
Concrete execution runtime paired before the shared session lifecycle begins.
Source§fn bounded_policy(runtime: &Self::Runtime) -> Option<&Bounded>
fn bounded_policy(runtime: &Self::Runtime) -> Option<&Bounded>
Returns bounded residency state for the shared session report.
Source§fn execution_residency(
runtime: &Self::Runtime,
_selected: &SelectedReplicatedTextRealization,
) -> ExecutionResidency
fn execution_residency( runtime: &Self::Runtime, _selected: &SelectedReplicatedTextRealization, ) -> ExecutionResidency
Returns the execution residency actually installed on this rank.
Source§fn forward_with_observer<'a, O>(
&mut self,
runtime: &mut Self::Runtime,
input: A::Input<'a>,
state: &mut S,
pass_kind: ExpertPass,
context: &<B::Tensor as Tensor>::Context,
observer: &mut O,
) -> Result<(B::Tensor, A::ForwardContext), ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
fn forward_with_observer<'a, O>( &mut self, runtime: &mut Self::Runtime, input: A::Input<'a>, state: &mut S, pass_kind: ExpertPass, context: &<B::Tensor as Tensor>::Context, observer: &mut O, ) -> Result<(B::Tensor, A::ForwardContext), ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
Executes one complete layered pass through the selected unit strategy.
Source§fn observe_output<O>(
runtime: &mut Self::Runtime,
output: &B::Tensor,
observer: &mut O,
_context: &<B::Tensor as Tensor>::Context,
) -> Result<B::Tensor, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
fn observe_output<O>( runtime: &mut Self::Runtime, output: &B::Tensor, observer: &mut O, _context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
Applies the architecture’s final-logits observation on the rank that
owns the authoritative output. Ordinary replicated strategies observe
locally; partitioned strategies may suppress the seam on destinations.
Source§fn publish_observed_output(
runtime: &mut Self::Runtime,
output: B::Tensor,
_context: &<B::Tensor as Tensor>::Context,
) -> Result<B::Tensor, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
fn publish_observed_output( runtime: &mut Self::Runtime, output: B::Tensor, _context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
Publishes an already-observed authoritative output after every rank has
agreed that final observation succeeded.
Source§fn prediction_target_capture(
runtime: &mut Self::Runtime,
forward: &A::ForwardContext,
context: &<B::Tensor as Tensor>::Context,
) -> Result<Option<B::Tensor>, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
fn prediction_target_capture( runtime: &mut Self::Runtime, forward: &A::ForwardContext, context: &<B::Tensor as Tensor>::Context, ) -> Result<Option<B::Tensor>, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
Resolves the rank-local tensor used by an additive prediction extension. Read more
Source§fn publish_prediction_target_capture(
runtime: &mut Self::Runtime,
capture: B::Tensor,
_context: &<B::Tensor as Tensor>::Context,
) -> Result<B::Tensor, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
fn publish_prediction_target_capture( runtime: &mut Self::Runtime, capture: B::Tensor, _context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
Publishes the output-owner capture to every prediction participant.
Source§fn apply_prediction_target_operation<O>(
runtime: &mut Self::Runtime,
state: &mut S,
operation: O,
context: &<B::Tensor as Tensor>::Context,
) -> Result<Option<O::Output>, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>where
O: PredictionTargetOperation<A, B, S>,
fn apply_prediction_target_operation<O>(
runtime: &mut Self::Runtime,
state: &mut S,
operation: O,
context: &<B::Tensor as Tensor>::Context,
) -> Result<Option<O::Output>, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>where
O: PredictionTargetOperation<A, B, S>,
Runs one typed prediction-only operation against session-owned target modules and state.
Source§fn commit_after_completion(
runtime: &mut Self::Runtime,
epoch: DistributedCommitEpoch,
_context: &<B::Tensor as Tensor>::Context,
) -> DistributedCommitOutcome
fn commit_after_completion( runtime: &mut Self::Runtime, epoch: DistributedCommitEpoch, _context: &<B::Tensor as Tensor>::Context, ) -> DistributedCommitOutcome
Performs strategy-specific distributed commit only after output
intervention and exact mechanism completion have succeeded.
Source§fn agree_distributed_phase(
runtime: &mut Self::Runtime,
phase: DistributedExecutionPhase,
local_success: bool,
_context: &<B::Tensor as Tensor>::Context,
) -> Result<bool, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
fn agree_distributed_phase( runtime: &mut Self::Runtime, phase: DistributedExecutionPhase, local_success: bool, _context: &<B::Tensor as Tensor>::Context, ) -> Result<bool, ReplicatedTextSessionError<A::Error, Resident::Error, Infallible>>
Propagates one local shared-session phase result before the lifecycle
can advance. Direct and unsupported strategies retain the local result.
Auto Trait Implementations§
impl<E, G, R, I, T, U, V> Freeze for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> RefUnwindSafe for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> Send for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> Sync for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> Unpin for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> UnsafeUnpin for PartitionedTextExecution<E, G, R, I, T, U, V>
impl<E, G, R, I, T, U, V> UnwindSafe for PartitionedTextExecution<E, G, R, I, T, U, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more