pub struct ProcessGroup { /* private fields */ }Expand description
Process group for distributed communication
Implementations§
Source§impl ProcessGroup
impl ProcessGroup
Sourcepub async fn new(
backend_type: BackendType,
rank: Rank,
world_size: WorldSize,
master_addr: &str,
master_port: u16,
) -> TorshResult<Self>
pub async fn new( backend_type: BackendType, rank: Rank, world_size: WorldSize, master_addr: &str, master_port: u16, ) -> TorshResult<Self>
Create a new process group
Sourcepub fn world_size(&self) -> WorldSize
pub fn world_size(&self) -> WorldSize
Get the world size
Sourcepub fn backend_type(&self) -> BackendType
pub fn backend_type(&self) -> BackendType
Get the backend type
Auto Trait Implementations§
impl Freeze for ProcessGroup
impl !RefUnwindSafe for ProcessGroup
impl Send for ProcessGroup
impl Sync for ProcessGroup
impl Unpin for ProcessGroup
impl UnsafeUnpin for ProcessGroup
impl !UnwindSafe for ProcessGroup
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more