Skip to main content

PartitionCommunication

Struct PartitionCommunication 

Source
pub struct PartitionCommunication<B, G, R, I>{ /* private fields */ }
Expand description

Opaque native communication resources paired in manifest order.

Implementations§

Source§

impl<B, G, R, I> PartitionCommunication<B, G, R, I>

Source

pub fn new( manifest: CommunicationManifest, groups: Vec<RealizedCommunicationGroup<G>>, routes: Vec<RealizedCommunicationRoute<R>>, inspector: I, ) -> Result<Self, PartitionExecutionError>

Pairs already-created opaque resources with their authoritative manifest order.

Source

pub fn new_with_authority( manifest: CommunicationManifest, groups: Vec<RealizedCommunicationGroup<G>>, routes: Vec<RealizedCommunicationRoute<R>>, inspector: I, authority: PartitionCommunicationAuthority, ) -> Result<Self, PartitionExecutionError>

Pairs native resources with an authority already retained by adjacent session APIs.

Source

pub const fn manifest(&self) -> &CommunicationManifest

Authoritative local-rank manifest.

Source

pub fn authority(&self) -> PartitionCommunicationAuthority

Shares the selected deadline and terminal poison domain with adjacent operations.

Source

pub fn all_reduce_sum( &self, value: B::Tensor, group: CollectiveGroupId, executor: &B::Executor, ) -> Result<B::Tensor, PartitionExecutionError>

Executes one exact sum reduction using only its narrow backend capability.

Source

pub fn all_reduce_sum_wave( &self, values: impl IntoIterator<Item = B::Tensor>, group: CollectiveGroupId, executor: &B::Executor, ) -> Result<Vec<B::Tensor>, PartitionExecutionError>

Submits one globally ordered wave of exact sum reductions before waiting for any member of the wave.

This is required for zero-work pipeline participants: an active peer may retain a lazy chain containing the entire wave, so waiting after the first zero-work submission would prevent later matching submissions from ever entering the native executor.

Source

pub fn all_gather_even( &self, value: B::Tensor, axis: usize, group: CollectiveGroupId, executor: &B::Executor, ) -> Result<B::Tensor, PartitionExecutionError>

Executes one exact equal-count gather.

Source

pub fn all_gather_uneven( &self, value: B::Tensor, counts: &[usize], axis: usize, group: CollectiveGroupId, executor: &B::Executor, ) -> Result<B::Tensor, PartitionExecutionError>

Executes one exact unequal-count gather.

Source

pub fn variable_all_to_all( &self, value: B::Tensor, counts: &CommunicationPeerCounts, axis: usize, group: CollectiveGroupId, executor: &B::Executor, ) -> Result<B::Tensor, PartitionExecutionError>

Executes the selected expert plan’s exact variable-count exchange without exposing EP semantics.

Source

pub fn complete_execution_dependencies<'a, V>( &self, values: V, executor: &B::Executor, ) -> Result<(), PartitionExecutionError>
where V: IntoIterator<Item = &'a B::Tensor>, B::Tensor: 'a,

Completes exact local tensor dependencies before the caller advances an architecture-declared distributed execution wave.

This is distinct from a collective: it contributes no tensor value and exists only to make lazy predecessors reach the selected bounded completion policy while every rank is still at the matching wave position.

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.