pub struct DirectReplicatedTextExecution;Expand description
Ordinary unit execution for replicated text architectures.
Trait Implementations§
Source§impl Clone for DirectReplicatedTextExecution
impl Clone for DirectReplicatedTextExecution
Source§fn clone(&self) -> DirectReplicatedTextExecution
fn clone(&self) -> DirectReplicatedTextExecution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DirectReplicatedTextExecution
Source§impl Default for DirectReplicatedTextExecution
impl Default for DirectReplicatedTextExecution
Source§fn default() -> DirectReplicatedTextExecution
fn default() -> DirectReplicatedTextExecution
Returns the “default value” for a type. Read more
impl<A, B, S, R, P> ReplicatedRuntimeExecutionStrategy<A, B, S, R, P> for DirectReplicatedTextExecutionwhere
B: SubmissionBackend<Executor = <<B as NeuralBackend>::Tensor as Tensor>::Context>,
S: RuntimeState<B>,
A: LayeredArchitecture<B, S>,
R: LayerwisePolicy<B, A::Unit>,
P: LayerwisePolicy<B, A::Unit, Error = R::Error>,
A::Error: Display,
P::Error: Display,
Source§impl<A, B, S, R, P> ReplicatedTextExecutionStrategy<A, B, S, R, P> for DirectReplicatedTextExecutionwhere
B: SubmissionBackend<Executor = <<B as NeuralBackend>::Tensor as Tensor>::Context>,
S: RuntimeState<B>,
A: LayeredArchitecture<B, S>,
R: LayerwisePolicy<B, A::Unit>,
P: LayerwisePolicy<B, A::Unit, Error = R::Error>,
A::Error: Display,
P::Error: Display,
impl<A, B, S, R, P> ReplicatedTextExecutionStrategy<A, B, S, R, P> for DirectReplicatedTextExecutionwhere
B: SubmissionBackend<Executor = <<B as NeuralBackend>::Tensor as Tensor>::Context>,
S: RuntimeState<B>,
A: LayeredArchitecture<B, S>,
R: LayerwisePolicy<B, A::Unit>,
P: LayerwisePolicy<B, A::Unit, Error = R::Error>,
A::Error: Display,
P::Error: Display,
Source§type Runtime = ReplicatedTextRuntime<A, B, S, R, P>
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>
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
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>>
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>>
Executes one complete layered pass through the selected unit strategy.
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>>
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 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>,
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
const PARTITIONED_SESSION: bool = false
Whether this strategy executes one rank of a partitioned session.
Source§const DISTRIBUTED_PHASE_AGREEMENT: bool = false
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>>
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>>
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>>
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 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>>
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
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>>
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§
impl Freeze for DirectReplicatedTextExecution
impl RefUnwindSafe for DirectReplicatedTextExecution
impl Send for DirectReplicatedTextExecution
impl Sync for DirectReplicatedTextExecution
impl Unpin for DirectReplicatedTextExecution
impl UnsafeUnpin for DirectReplicatedTextExecution
impl UnwindSafe for DirectReplicatedTextExecution
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