pub struct CommunicationStats {
pub allreduce_operations: u64,
pub allreduce_time: Duration,
pub allreduce_bytes: usize,
pub broadcast_operations: u64,
pub broadcast_time: Duration,
pub broadcast_bytes: usize,
pub p2p_operations: u64,
pub p2p_time: Duration,
pub p2p_bytes: usize,
pub communication_efficiency: f64,
}Expand description
Distributed communication statistics
Fields§
§allreduce_operations: u64Number of all-reduce operations
allreduce_time: DurationTotal time spent in all-reduce
allreduce_bytes: usizeTotal bytes all-reduced
broadcast_operations: u64Number of broadcast operations
broadcast_time: DurationTotal time spent in broadcast
broadcast_bytes: usizeTotal bytes broadcast
p2p_operations: u64Number of point-to-point communications
p2p_time: DurationTotal time spent in point-to-point communication
p2p_bytes: usizeTotal bytes in point-to-point communication
communication_efficiency: f64Communication efficiency (achieved vs theoretical)
Implementations§
Source§impl CommunicationStats
impl CommunicationStats
pub fn new() -> Self
pub fn record_gradient_sync( &mut self, duration: Duration, num_gradients: usize, world_size: usize, )
pub fn record_operation( &mut self, operation: CommunicationOperation, duration: Duration, bytes: usize, )
pub fn get_efficiency(&self) -> f64
pub fn get_allreduce_bandwidth(&self) -> f64
pub fn get_broadcast_bandwidth(&self) -> f64
pub fn merge(&mut self, other: &CommunicationStats)
Trait Implementations§
Source§impl Clone for CommunicationStats
impl Clone for CommunicationStats
Source§fn clone(&self) -> CommunicationStats
fn clone(&self) -> CommunicationStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommunicationStats
impl Debug for CommunicationStats
Auto Trait Implementations§
impl Freeze for CommunicationStats
impl RefUnwindSafe for CommunicationStats
impl Send for CommunicationStats
impl Sync for CommunicationStats
impl Unpin for CommunicationStats
impl UnsafeUnpin for CommunicationStats
impl UnwindSafe for CommunicationStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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