pub struct GpuConfig {
pub backend: GpuBackend,
pub device_id: usize,
pub memory_limit_mb: Option<usize>,
pub batch_size: usize,
pub n_streams: usize,
pub mixed_precision: bool,
pub tensor_cores: bool,
pub memory_pool_size_mb: usize,
pub enable_profiling: bool,
}Expand description
GPU configuration
Fields§
§backend: GpuBackendGPU backend to use
device_id: usizeDevice ID (for systems with multiple GPUs)
memory_limit_mb: Option<usize>Memory limit for GPU usage (in MB)
batch_size: usizeBatch size for GPU operations
n_streams: usizeNumber of GPU streams for parallel execution
mixed_precision: boolEnable mixed precision (FP16/FP32)
tensor_cores: boolEnable tensor cores (for supported hardware)
memory_pool_size_mb: usizeMemory pool size for efficient allocation
enable_profiling: boolEnable profiling for performance analysis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuConfig
impl RefUnwindSafe for GpuConfig
impl Send for GpuConfig
impl Sync for GpuConfig
impl Unpin for GpuConfig
impl UnwindSafe for GpuConfig
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