pub struct GraphMetrics {
pub tensor_count: usize,
pub node_count: usize,
pub input_count: usize,
pub output_count: usize,
pub op_breakdown: HashMap<String, usize>,
pub depth: usize,
pub avg_fanout: f64,
pub estimated_flops: u64,
pub estimated_memory: u64,
}Expand description
Graph complexity metrics
Fields§
§tensor_count: usizeTotal number of tensors
node_count: usizeTotal number of nodes
input_count: usizeNumber of input tensors
output_count: usizeNumber of output tensors
op_breakdown: HashMap<String, usize>Operation type breakdown
depth: usizeGraph depth (longest path)
avg_fanout: f64Average fanout (outputs per node)
estimated_flops: u64Estimated computational complexity (FLOPs)
estimated_memory: u64Estimated memory usage (bytes)
Implementations§
Source§impl GraphMetrics
impl GraphMetrics
Sourcepub fn analyze(graph: &EinsumGraph) -> Self
pub fn analyze(graph: &EinsumGraph) -> Self
Analyze an einsum graph
Trait Implementations§
Source§impl Clone for GraphMetrics
impl Clone for GraphMetrics
Source§fn clone(&self) -> GraphMetrics
fn clone(&self) -> GraphMetrics
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 moreAuto Trait Implementations§
impl Freeze for GraphMetrics
impl RefUnwindSafe for GraphMetrics
impl Send for GraphMetrics
impl Sync for GraphMetrics
impl Unpin for GraphMetrics
impl UnwindSafe for GraphMetrics
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> 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