pub struct OptimizationEfficiency {
pub compute_time: Duration,
pub communication_time: Duration,
pub memory_efficiency: f64,
pub parameter_update_efficiency: f64,
pub overall_efficiency: f64,
pub measurements: u32,
}Expand description
Optimization efficiency metrics
Fields§
§compute_time: DurationTime spent in computation vs communication
communication_time: DurationTime spent in communication
memory_efficiency: f64Memory utilization efficiency (0.0 to 1.0)
parameter_update_efficiency: f64Parameter update efficiency
overall_efficiency: f64Overall training efficiency score
measurements: u32Number of efficiency measurements
Implementations§
Source§impl OptimizationEfficiency
impl OptimizationEfficiency
pub fn new() -> Self
pub fn record_forward_pass(&mut self, duration: Duration)
pub fn record_backward_pass(&mut self, duration: Duration)
pub fn record_optimizer_step(&mut self, duration: Duration, _num_params: usize)
pub fn record_communication(&mut self, duration: Duration)
pub fn update_memory_efficiency(&mut self, efficiency: f64)
pub fn update_parameter_efficiency(&mut self, efficiency: f64)
pub fn get_compute_ratio(&self) -> f64
pub fn get_communication_ratio(&self) -> f64
pub fn get_overall_efficiency(&self) -> f64
pub fn merge(&mut self, other: &OptimizationEfficiency)
Trait Implementations§
Source§impl Clone for OptimizationEfficiency
impl Clone for OptimizationEfficiency
Source§fn clone(&self) -> OptimizationEfficiency
fn clone(&self) -> OptimizationEfficiency
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 OptimizationEfficiency
impl Debug for OptimizationEfficiency
Auto Trait Implementations§
impl Freeze for OptimizationEfficiency
impl RefUnwindSafe for OptimizationEfficiency
impl Send for OptimizationEfficiency
impl Sync for OptimizationEfficiency
impl Unpin for OptimizationEfficiency
impl UnsafeUnpin for OptimizationEfficiency
impl UnwindSafe for OptimizationEfficiency
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