pub struct RankCommunicator<D> { /* private fields */ }Implementations§
Source§impl<D> RankCommunicator<D>
impl<D> RankCommunicator<D>
pub fn connect<E>( initialize: impl FnOnce() -> Result<D, E>, address: impl ToSocketAddrs, unique_id: UniqueId, rank: u32, world_size: u32, timeout: Duration, queue_name: &'static str, ) -> Result<Self, E>
pub fn from_session<E>( initialize: impl FnOnce() -> Result<D, E>, session: TcpRankSession, queue_name: &'static str, ) -> Result<Self, E>
pub fn from_session_with_tuning<E>( initialize: impl FnOnce() -> Result<D, E>, session: TcpRankSession, tuning: CollectiveTuning, queue_name: &'static str, ) -> Result<Self, E>
pub fn from_transport_with_tuning<T, E>( initialize: impl FnOnce() -> Result<D, E>, transport: T, tuning: CollectiveTuning, queue_name: &'static str, ) -> Result<Self, E>
Source§impl<D> RankCommunicator<D>
impl<D> RankCommunicator<D>
pub fn rank(&self) -> u32
pub fn world_size(&self) -> u32
pub fn p2p_rails(&self) -> usize
pub fn collective_rail_order(&self) -> &[usize]
pub fn plan_collective( &self, kind: CollectiveKind, payload_bytes: usize, ) -> CollectivePlan
pub fn transport(&self) -> CollectiveTransport
pub fn tuning(&self) -> &CollectiveTuning
pub fn execution(&self) -> &D
pub fn host(&self) -> HostStagedExchange<'_>
pub fn device_collective<T>(
&self,
element_type: ElementType,
) -> DeviceCollective<'_, T, D>where
D: RankDevice<T>,
D::Error: From<RankError> + From<NetworkError> + From<TopologyError> + From<WorkError>,
pub fn submit<T: Send + 'static, E: From<WorkError> + Send + 'static>( &self, task: impl FnOnce() -> Result<T, E> + Send + 'static, ) -> Result<CollectiveWork<T, E>, E>
Source§impl<B: Backend> RankCommunicator<TensorDevice<B>>
impl<B: Backend> RankCommunicator<TensorDevice<B>>
Sourcepub fn tensor_collective<T: TensorElement>(
&self,
) -> DeviceCollective<'_, T, TensorDevice<B>>
pub fn tensor_collective<T: TensorElement>( &self, ) -> DeviceCollective<'_, T, TensorDevice<B>>
Select the wire element type from the typed tensor buffer contract.
Source§impl<B: Backend> RankCommunicator<TensorDevice<B>>
impl<B: Backend> RankCommunicator<TensorDevice<B>>
Sourcepub fn all_reduce_float(
&self,
value: B::FloatTensorPrimitive,
operation: ReduceOperation,
) -> Result<B::FloatTensorPrimitive, TensorDeviceError>
pub fn all_reduce_float( &self, value: B::FloatTensorPrimitive, operation: ReduceOperation, ) -> Result<B::FloatTensorPrimitive, TensorDeviceError>
Reduce a floating tensor through this rank’s configured transport.
All ranks must submit the same tensor shapes, dtypes and operations in the same order. The backend reshapes non-contiguous inputs according to its normal tensor semantics; output shape, dtype and device are retained. Transfers are host-staged, while arithmetic uses the tensor backend.
Trait Implementations§
Source§impl<D: Clone> Clone for RankCommunicator<D>
impl<D: Clone> Clone for RankCommunicator<D>
Source§fn clone(&self) -> RankCommunicator<D>
fn clone(&self) -> RankCommunicator<D>
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 moreAuto Trait Implementations§
impl<D> !RefUnwindSafe for RankCommunicator<D>
impl<D> !UnwindSafe for RankCommunicator<D>
impl<D> Freeze for RankCommunicator<D>where
D: Freeze,
impl<D> Send for RankCommunicator<D>where
D: Send,
impl<D> Sync for RankCommunicator<D>where
D: Sync,
impl<D> Unpin for RankCommunicator<D>where
D: Unpin,
impl<D> UnsafeUnpin for RankCommunicator<D>where
D: UnsafeUnpin,
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