pub struct LayerTimingStats {
pub forward_executions: u64,
pub backward_executions: u64,
pub total_forward_time: Duration,
pub total_backward_time: Duration,
pub min_forward_time: Duration,
pub max_forward_time: Duration,
pub min_backward_time: Duration,
pub max_backward_time: Duration,
}Expand description
Per-layer timing statistics
Fields§
§forward_executions: u64Number of forward executions
backward_executions: u64Number of backward executions
total_forward_time: DurationTotal time spent in forward passes
total_backward_time: DurationTotal time spent in backward passes
min_forward_time: DurationMinimum forward execution time
max_forward_time: DurationMaximum forward execution time
min_backward_time: DurationMinimum backward execution time
max_backward_time: DurationMaximum backward execution time
Implementations§
Source§impl LayerTimingStats
impl LayerTimingStats
pub fn new() -> Self
pub fn record_forward_execution(&mut self, duration: Duration)
pub fn record_backward_execution(&mut self, duration: Duration)
pub fn average_forward_time(&self) -> Duration
pub fn average_backward_time(&self) -> Duration
pub fn merge(&mut self, other: &LayerTimingStats)
Trait Implementations§
Source§impl Clone for LayerTimingStats
impl Clone for LayerTimingStats
Source§fn clone(&self) -> LayerTimingStats
fn clone(&self) -> LayerTimingStats
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 LayerTimingStats
impl Debug for LayerTimingStats
Auto Trait Implementations§
impl Freeze for LayerTimingStats
impl RefUnwindSafe for LayerTimingStats
impl Send for LayerTimingStats
impl Sync for LayerTimingStats
impl Unpin for LayerTimingStats
impl UnsafeUnpin for LayerTimingStats
impl UnwindSafe for LayerTimingStats
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