pub struct GpuMemoryLimits {
pub total_vram: u64,
pub usable_vram: u64,
pub morsel_size: usize,
pub max_morsels: usize,
}Expand description
GPU memory limits and statistics
Fields§
§total_vram: u64Total VRAM available (bytes)
usable_vram: u64Maximum memory to use for graph data (70% of total to leave headroom)
morsel_size: usizeMorsel size for chunking (default 128MB)
max_morsels: usizeMaximum number of morsels that fit in VRAM
Implementations§
Source§impl GpuMemoryLimits
impl GpuMemoryLimits
Sourcepub fn fits_in_vram(&self, graph_size_bytes: usize) -> bool
pub fn fits_in_vram(&self, graph_size_bytes: usize) -> bool
Check if graph fits entirely in VRAM
Sourcepub fn morsels_needed(&self, size_bytes: usize) -> usize
pub fn morsels_needed(&self, size_bytes: usize) -> usize
Calculate number of morsels needed for given size
Sourcepub fn recommended_tile_size(&self, node_size_bytes: usize) -> usize
pub fn recommended_tile_size(&self, node_size_bytes: usize) -> usize
Get recommended tile size in nodes for chunking
Trait Implementations§
Source§impl Clone for GpuMemoryLimits
impl Clone for GpuMemoryLimits
Source§fn clone(&self) -> GpuMemoryLimits
fn clone(&self) -> GpuMemoryLimits
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 moreAuto Trait Implementations§
impl Freeze for GpuMemoryLimits
impl RefUnwindSafe for GpuMemoryLimits
impl Send for GpuMemoryLimits
impl Sync for GpuMemoryLimits
impl Unpin for GpuMemoryLimits
impl UnsafeUnpin for GpuMemoryLimits
impl UnwindSafe for GpuMemoryLimits
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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