Skip to main content

plan_fusion

Function plan_fusion 

Source
pub fn plan_fusion(ops: &[TensorOp]) -> u32
Expand description

Plan stream fusion: the number of wgpu compute passes a sequence needs after fusing each maximal run of same-shape element-wise ops into a single pass. Barriers each take their own pass. Result is in 1..=ops.len(); fewer passes ⇒ fewer dispatch / PCIe round-trips. Zero-heap (single linear scan).