pub struct MemoryAnalysis {
pub tensors: Vec<TensorMemory>,
pub peak_memory_bytes: usize,
pub total_memory_bytes: usize,
pub avg_utilization: f64,
pub optimal_schedule: Vec<usize>,
}Expand description
Memory optimization analysis result
Fields§
§tensors: Vec<TensorMemory>Memory information for each tensor
peak_memory_bytes: usizePeak memory usage in bytes
total_memory_bytes: usizeTotal memory allocated across all tensors
avg_utilization: f64Average memory utilization (0.0 to 1.0)
optimal_schedule: Vec<usize>Suggested operation execution order for minimal peak memory
Implementations§
Source§impl MemoryAnalysis
impl MemoryAnalysis
Sourcepub fn memory_waste_ratio(&self) -> f64
pub fn memory_waste_ratio(&self) -> f64
Get memory waste (difference between peak and average)
Trait Implementations§
Source§impl Clone for MemoryAnalysis
impl Clone for MemoryAnalysis
Source§fn clone(&self) -> MemoryAnalysis
fn clone(&self) -> MemoryAnalysis
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 MemoryAnalysis
impl Debug for MemoryAnalysis
Auto Trait Implementations§
impl Freeze for MemoryAnalysis
impl RefUnwindSafe for MemoryAnalysis
impl Send for MemoryAnalysis
impl Sync for MemoryAnalysis
impl Unpin for MemoryAnalysis
impl UnwindSafe for MemoryAnalysis
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