pub struct PartitionCommunication<B, G, R, I>where
B: CommunicationBackend,{ /* private fields */ }Expand description
Opaque native communication resources paired in manifest order.
Implementations§
Source§impl<B, G, R, I> PartitionCommunication<B, G, R, I>where
B: CommunicationBackend,
G: Borrow<B::CommunicationGroup>,
R: Borrow<B::CommunicationRoute>,
I: CommunicationTensorMetadata<B>,
impl<B, G, R, I> PartitionCommunication<B, G, R, I>where
B: CommunicationBackend,
G: Borrow<B::CommunicationGroup>,
R: Borrow<B::CommunicationRoute>,
I: CommunicationTensorMetadata<B>,
Sourcepub fn new(
manifest: CommunicationManifest,
groups: Vec<RealizedCommunicationGroup<G>>,
routes: Vec<RealizedCommunicationRoute<R>>,
inspector: I,
) -> Result<Self, PartitionExecutionError>
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.
Pairs native resources with an authority already retained by adjacent session APIs.
Sourcepub const fn manifest(&self) -> &CommunicationManifest
pub const fn manifest(&self) -> &CommunicationManifest
Authoritative local-rank manifest.
Shares the selected deadline and terminal poison domain with adjacent operations.
Sourcepub fn all_reduce_sum(
&self,
value: B::Tensor,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: SumReductionBackend,
pub fn all_reduce_sum(
&self,
value: B::Tensor,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: SumReductionBackend,
Executes one exact sum reduction using only its narrow backend capability.
Sourcepub fn all_reduce_sum_wave(
&self,
values: impl IntoIterator<Item = B::Tensor>,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<Vec<B::Tensor>, PartitionExecutionError>where
B: SumReductionBackend,
pub fn all_reduce_sum_wave(
&self,
values: impl IntoIterator<Item = B::Tensor>,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<Vec<B::Tensor>, PartitionExecutionError>where
B: SumReductionBackend,
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.
Sourcepub fn all_gather_even(
&self,
value: B::Tensor,
axis: usize,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: EvenGatherBackend,
pub fn all_gather_even(
&self,
value: B::Tensor,
axis: usize,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: EvenGatherBackend,
Executes one exact equal-count gather.
Sourcepub fn all_gather_uneven(
&self,
value: B::Tensor,
counts: &[usize],
axis: usize,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: UnevenGatherBackend,
pub fn all_gather_uneven(
&self,
value: B::Tensor,
counts: &[usize],
axis: usize,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: UnevenGatherBackend,
Executes one exact unequal-count gather.
Sourcepub fn variable_all_to_all(
&self,
value: B::Tensor,
counts: &CommunicationPeerCounts,
axis: usize,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: VariableAllToAllBackend,
pub fn variable_all_to_all(
&self,
value: B::Tensor,
counts: &CommunicationPeerCounts,
axis: usize,
group: CollectiveGroupId,
executor: &B::Executor,
) -> Result<B::Tensor, PartitionExecutionError>where
B: VariableAllToAllBackend,
Executes the selected expert plan’s exact variable-count exchange without exposing EP semantics.
Sourcepub fn complete_execution_dependencies<'a, V>(
&self,
values: V,
executor: &B::Executor,
) -> Result<(), PartitionExecutionError>
pub fn complete_execution_dependencies<'a, V>( &self, values: V, executor: &B::Executor, ) -> Result<(), PartitionExecutionError>
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.