pub struct Schedule { /* private fields */ }Expand description
Pipeline schedule: a per-stage sequence of operations over time.
Implementations§
Source§impl Schedule
impl Schedule
Sourcepub fn num_stages(&self) -> usize
pub fn num_stages(&self) -> usize
Number of pipeline stages.
Sourcepub fn num_microbatches(&self) -> usize
pub fn num_microbatches(&self) -> usize
Number of micro-batches.
Sourcepub fn steps(&self, stage: usize) -> &[ScheduleStep]
pub fn steps(&self, stage: usize) -> &[ScheduleStep]
Steps for a given stage in time order.
Sourcepub fn total_steps(&self) -> usize
pub fn total_steps(&self) -> usize
Total number of time steps.
Sourcepub fn bubble_steps(&self) -> usize
pub fn bubble_steps(&self) -> usize
Count the number of idle (bubble) steps across all stages.
Sourcepub fn bubble_ratio(&self) -> f64
pub fn bubble_ratio(&self) -> f64
Bubble ratio: fraction of all (stage × time) slots that are idle.
Sourcepub fn at_time(&self, time: usize) -> Vec<&ScheduleStep>
pub fn at_time(&self, time: usize) -> Vec<&ScheduleStep>
All steps at a given time across all stages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnsafeUnpin for Schedule
impl UnwindSafe for Schedule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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