pub enum TrainingBackend {
Cpu,
Cuda {
device: usize,
memory_budget_mib: usize,
},
Metal {
device: usize,
memory_budget_mib: usize,
},
}Expand description
Selects where fitting is performed. The accelerator backends are deliberately fail-closed: a CUDA or Metal request never falls back to CPU training, because silently turning a GPU study into a CPU one changes how long it runs by more than an order of magnitude.
Variants§
Cpu
Cuda
Metal
Apple Silicon (and any other Metal device). device indexes
metal::Device::all(); 0 is the system default.
Implementations§
Trait Implementations§
Source§impl Clone for TrainingBackend
impl Clone for TrainingBackend
impl Copy for TrainingBackend
Source§impl Debug for TrainingBackend
impl Debug for TrainingBackend
impl Eq for TrainingBackend
Source§impl PartialEq for TrainingBackend
impl PartialEq for TrainingBackend
impl StructuralPartialEq for TrainingBackend
Auto Trait Implementations§
impl Forget for TrainingBackend
impl Freeze for TrainingBackend
impl Move for TrainingBackend
impl RefUnwindSafe for TrainingBackend
impl Send for TrainingBackend
impl Sync for TrainingBackend
impl Unpin for TrainingBackend
impl UnsafeUnpin for TrainingBackend
impl UnwindSafe for TrainingBackend
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> 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