pub struct GpuMemoryPool { /* private fields */ }Expand description
Advanced GPU Memory Management
This module provides sophisticated GPU memory management capabilities for high-performance inference and training workloads. GPU Memory Pool for efficient allocation and deallocation
Implementations§
Source§impl GpuMemoryPool
impl GpuMemoryPool
Sourcepub fn allocate(&mut self, size_bytes: usize) -> Result<GpuMemoryChunk>
pub fn allocate(&mut self, size_bytes: usize) -> Result<GpuMemoryChunk>
Allocate memory from the pool
Sourcepub fn deallocate(&mut self, chunk: GpuMemoryChunk) -> Result<()>
pub fn deallocate(&mut self, chunk: GpuMemoryChunk) -> Result<()>
Deallocate memory back to the pool
Sourcepub fn get_statistics(&self) -> GpuMemoryStats
pub fn get_statistics(&self) -> GpuMemoryStats
Get memory pool statistics
Sourcepub fn get_memory_usage_percentage(&self) -> f32
pub fn get_memory_usage_percentage(&self) -> f32
Get current memory usage as percentage of limit
Sourcepub fn get_cache_efficiency(&self) -> f32
pub fn get_cache_efficiency(&self) -> f32
Get cache efficiency (hit rate)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuMemoryPool
impl RefUnwindSafe for GpuMemoryPool
impl Send for GpuMemoryPool
impl Sync for GpuMemoryPool
impl Unpin for GpuMemoryPool
impl UnsafeUnpin for GpuMemoryPool
impl UnwindSafe for GpuMemoryPool
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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