pub struct AutoDeviceConfig {
pub gpu_threshold: usize,
pub distributed_threshold: usize,
pub enable_mixed_precision: bool,
pub prefer_memory_efficiency: bool,
pub auto_transfer: bool,
pub prefer_data_locality: bool,
pub preferred_gpu_backend: GPUBackend,
pub fallback_to_cpu: bool,
}
Expand description
Configuration for automatic device placement.
Fields§
§gpu_threshold: usize
Minimum array size (total elements) to consider GPU placement.
distributed_threshold: usize
Minimum array size to consider distributed placement.
enable_mixed_precision: bool
Enable mixed-precision operations.
prefer_memory_efficiency: bool
Prefer memory efficiency over speed.
auto_transfer: bool
Automatically transfer arrays between devices when needed.
prefer_data_locality: bool
Prefer device data locality (avoid transfers).
preferred_gpu_backend: GPUBackend
Preferred GPU backend.
fallback_to_cpu: bool
Fallback to CPU if GPU is not available.
Trait Implementations§
Source§impl Clone for AutoDeviceConfig
impl Clone for AutoDeviceConfig
Source§fn clone(&self) -> AutoDeviceConfig
fn clone(&self) -> AutoDeviceConfig
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 AutoDeviceConfig
impl Debug for AutoDeviceConfig
Auto Trait Implementations§
impl Freeze for AutoDeviceConfig
impl RefUnwindSafe for AutoDeviceConfig
impl Send for AutoDeviceConfig
impl Sync for AutoDeviceConfig
impl Unpin for AutoDeviceConfig
impl UnwindSafe for AutoDeviceConfig
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