pub struct SystemMemoryInfo {
pub total_ram_bytes: u64,
pub gpu_memory_bytes: Option<u64>,
pub is_unified_memory: bool,
pub has_nvidia_gpu: bool,
}Expand description
System memory information for model fit calculations.
Fields§
§total_ram_bytes: u64Total system RAM in bytes.
gpu_memory_bytes: Option<u64>GPU memory in bytes: VRAM on a discrete card, or the addressable share of host RAM on a unified-memory device (Apple Silicon, or an integrated GPU). None if no GPU was detected or its memory could not be read.
is_unified_memory: boolWhether the GPU shares host memory — Apple Silicon, or an integrated GPU whose heaps are GTT rather than its own VRAM. Decides whether the figure above is labelled “VRAM” or “unified memory” to the user.
has_nvidia_gpu: boolWhether the system has an NVIDIA GPU.
Trait Implementations§
Source§impl Clone for SystemMemoryInfo
impl Clone for SystemMemoryInfo
Source§fn clone(&self) -> SystemMemoryInfo
fn clone(&self) -> SystemMemoryInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SystemMemoryInfo
impl Debug for SystemMemoryInfo
Source§impl<'de> Deserialize<'de> for SystemMemoryInfo
impl<'de> Deserialize<'de> for SystemMemoryInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SystemMemoryInfo
impl RefUnwindSafe for SystemMemoryInfo
impl Send for SystemMemoryInfo
impl Sync for SystemMemoryInfo
impl Unpin for SystemMemoryInfo
impl UnsafeUnpin for SystemMemoryInfo
impl UnwindSafe for SystemMemoryInfo
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