pub struct PipelineParallelConfig {
pub num_stages: usize,
pub num_micro_batches: usize,
}Expand description
Configuration for pipeline-parallel training.
Pipeline parallelism partitions a model’s sequential layers into
num_stages stages, each assigned to a different device. During training,
the mini-batch is split into num_micro_batches micro-batches that flow
through the pipeline concurrently (GPipe-style scheduling), reducing the
bubble time compared to naive sequential execution.
Use split_into_stages to compute the layer ranges for each stage.
Fields§
§num_stages: usizeNumber of pipeline stages
num_micro_batches: usizeNumber of micro-batches per mini-batch
Implementations§
Auto Trait Implementations§
impl Freeze for PipelineParallelConfig
impl RefUnwindSafe for PipelineParallelConfig
impl Send for PipelineParallelConfig
impl Sync for PipelineParallelConfig
impl Unpin for PipelineParallelConfig
impl UnsafeUnpin for PipelineParallelConfig
impl UnwindSafe for PipelineParallelConfig
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> 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