pub struct MultiGpuTrainer { /* private fields */ }
Expand description
Multi-GPU training coordinator
Implementations§
Source§impl MultiGpuTrainer
impl MultiGpuTrainer
Sourcepub fn set_reduction_strategy(&mut self, strategy: ReductionStrategy)
pub fn set_reduction_strategy(&mut self, strategy: ReductionStrategy)
Set reduction strategy
Sourcepub fn all_reduce<T>(&self, tensors: &mut [CudaTensor<T>]) -> Result<()>
pub fn all_reduce<T>(&self, tensors: &mut [CudaTensor<T>]) -> Result<()>
Perform all-reduce operation across GPUs
Sourcepub fn device_count(&self) -> usize
pub fn device_count(&self) -> usize
Get number of devices
Sourcepub fn memory_stats_all(&self) -> Result<Vec<MemoryStats>>
pub fn memory_stats_all(&self) -> Result<Vec<MemoryStats>>
Get memory statistics for all devices
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiGpuTrainer
impl RefUnwindSafe for MultiGpuTrainer
impl Send for MultiGpuTrainer
impl Sync for MultiGpuTrainer
impl Unpin for MultiGpuTrainer
impl UnwindSafe for MultiGpuTrainer
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