pub struct MemoryEstimator { /* private fields */ }Expand description
Memory estimator for execution graphs
Implementations§
Source§impl MemoryEstimator
impl MemoryEstimator
pub fn new(dtype: DType) -> Self
Sourcepub fn estimate(&self, graph: &EinsumGraph) -> MemoryEstimate
pub fn estimate(&self, graph: &EinsumGraph) -> MemoryEstimate
Estimate memory usage for a graph
Note: Uses default shape [10] for all tensors since graph only stores names
Sourcepub fn estimate_with_lifetime(&self, graph: &EinsumGraph) -> MemoryEstimate
pub fn estimate_with_lifetime(&self, graph: &EinsumGraph) -> MemoryEstimate
Estimate memory with tensor lifetime analysis for peak usage
Sourcepub fn estimate_batch(
&self,
graph: &EinsumGraph,
batch_size: usize,
) -> MemoryEstimate
pub fn estimate_batch( &self, graph: &EinsumGraph, batch_size: usize, ) -> MemoryEstimate
Estimate memory for a batch of inputs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryEstimator
impl RefUnwindSafe for MemoryEstimator
impl Send for MemoryEstimator
impl Sync for MemoryEstimator
impl Unpin for MemoryEstimator
impl UnwindSafe for MemoryEstimator
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