pub struct FusionReport {Show 17 fields
pub nodes_before: usize,
pub nodes_after: usize,
pub matmul_before: usize,
pub attention: usize,
pub rope: usize,
pub narrow: usize,
pub matmul_after: usize,
pub silu: usize,
pub mul: usize,
pub fused_matmul_bias_act: usize,
pub fused_swiglu: usize,
pub fused_residual_ln: usize,
pub fused_residual_rms_norm: usize,
pub fused_attention_block: usize,
pub fused_transformer_layer: usize,
pub elementwise_region: usize,
pub missed: Vec<MissedFusion>,
}Expand description
Before/after fusion statistics and missed-pattern tally.
Fields§
§nodes_before: usize§nodes_after: usize§matmul_before: usize§attention: usize§rope: usize§narrow: usize§matmul_after: usize§silu: usize§mul: usize§fused_matmul_bias_act: usize§fused_swiglu: usize§fused_residual_ln: usize§fused_residual_rms_norm: usize§fused_attention_block: usize§fused_transformer_layer: usize§elementwise_region: usize§missed: Vec<MissedFusion>Implementations§
Source§impl FusionReport
impl FusionReport
Sourcepub fn analyze(before: &Graph, after: &Graph) -> FusionReport
pub fn analyze(before: &Graph, after: &Graph) -> FusionReport
Compare an unfused graph with the post-pass result.
Sourcepub fn scan(graph: &Graph) -> FusionReport
pub fn scan(graph: &Graph) -> FusionReport
Scan a graph (typically post-fusion) for patterns that should have collapsed but did not.
pub fn missed_matmul_bias_act(&self) -> usize
pub fn missed_swiglu(&self) -> usize
Sourcepub fn summary_line(&self) -> String
pub fn summary_line(&self) -> String
One-line summary suitable for logs and CSV benches.
Trait Implementations§
Source§impl Clone for FusionReport
impl Clone for FusionReport
Source§fn clone(&self) -> FusionReport
fn clone(&self) -> FusionReport
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 moreSource§impl Debug for FusionReport
impl Debug for FusionReport
Source§impl Default for FusionReport
impl Default for FusionReport
Source§fn default() -> FusionReport
fn default() -> FusionReport
Returns the “default value” for a type. Read more
Source§impl Display for FusionReport
impl Display for FusionReport
Source§impl PartialEq for FusionReport
impl PartialEq for FusionReport
Source§fn eq(&self, other: &FusionReport) -> bool
fn eq(&self, other: &FusionReport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FusionReport
impl StructuralPartialEq for FusionReport
Auto Trait Implementations§
impl Freeze for FusionReport
impl RefUnwindSafe for FusionReport
impl Send for FusionReport
impl Sync for FusionReport
impl Unpin for FusionReport
impl UnsafeUnpin for FusionReport
impl UnwindSafe for FusionReport
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