Skip to main content

RoutedReplicatedTextExecution

Struct RoutedReplicatedTextExecution 

Source
pub struct RoutedReplicatedTextExecution<P> { /* private fields */ }
Expand description

Provider-backed routed unit execution using the shared replicated session.

Implementations§

Source§

impl<P> RoutedReplicatedTextExecution<P>

Source

pub const fn new(provider: P) -> Self

Creates routed unit execution from one neutral provider strategy.

Source

pub const fn provider(&self) -> &P

Returns the live provider for mechanism telemetry and reports.

Trait Implementations§

Source§

impl<A, B, S, R, P, Provider> ReplicatedRuntimeExecutionStrategy<A, B, S, R, P> for RoutedReplicatedTextExecution<Provider>
where B: SubmissionBackend<Executor = <<B as NeuralBackend>::Tensor as Tensor>::Context> + GroupedNeuralBackend, S: RuntimeState<B>, A: LayeredArchitecture<B, S> + RoutedLayeredArchitecture<B, S>, R: LayerwisePolicy<B, A::Unit>, P: LayerwisePolicy<B, A::Unit, Error = R::Error>, Provider: RoutedExpertProvider<B>, Provider::Error: Display, A::Error: Display, P::Error: Display,

Source§

impl<A, B, S, R, P, Provider> ReplicatedTextExecutionStrategy<A, B, S, R, P> for RoutedReplicatedTextExecution<Provider>
where B: SubmissionBackend<Executor = <<B as NeuralBackend>::Tensor as Tensor>::Context> + GroupedNeuralBackend, S: RuntimeState<B>, A: LayeredArchitecture<B, S> + RoutedLayeredArchitecture<B, S>, R: LayerwisePolicy<B, A::Unit>, P: LayerwisePolicy<B, A::Unit, Error = R::Error>, Provider: RoutedExpertProvider<B>, Provider::Error: Display, A::Error: Display, P::Error: Display,

Source§

type Runtime = ReplicatedTextRuntime<A, B, S, R, P>

Concrete execution runtime paired before the shared session lifecycle begins.
Source§

fn bounded_policy(runtime: &Self::Runtime) -> Option<&P>

Returns bounded residency state for the shared session report.
Source§

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: ExpertPass, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, observer: &mut O, ) -> Result<(B::Tensor, A::ForwardContext), ReplicatedTextSessionError<A::Error, R::Error, Infallible>>
where O: ActivationObserver<B::Tensor, A::Error> + ?Sized,

Executes one complete layered pass through the selected unit strategy.
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, R::Error, Infallible>>
where O: PredictionTargetOperation<A, B, S>,

Runs one typed prediction-only operation against session-owned target modules and state.
Source§

const PARTITIONED_SESSION: bool = false

Whether this strategy executes one rank of a partitioned session.
Source§

const DISTRIBUTED_PHASE_AGREEMENT: bool = false

Whether control phases use a selected bounded all-rank agreement.
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, R::Error, Infallible>>
where O: ActivationObserver<B::Tensor, A::Error> + ?Sized,

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, R::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, R::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, R::Error, Infallible>>

Publishes the output-owner capture to every prediction participant.
Source§

fn commit_after_completion( _runtime: &mut Self::Runtime, epoch: DistributedCommitEpoch, _context: &<<B as NeuralBackend>::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 as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<bool, ReplicatedTextSessionError<A::Error, R::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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.