pub struct FusionCostModel {
pub memory_access_cost: f64,
pub compute_cost: f64,
pub kernel_launch_cost: f64,
pub memory_bandwidth: f64,
}Expand description
Cost model for fusion decisions.
Fields§
§memory_access_cost: f64Cost of memory access (relative units)
compute_cost: f64Cost of compute operation (relative units)
kernel_launch_cost: f64Cost of kernel launch overhead
memory_bandwidth: f64Memory bandwidth (bytes/second)
Implementations§
Source§impl FusionCostModel
impl FusionCostModel
Sourcepub fn cost_separate(&self, num_ops: usize, data_size: usize) -> f64
pub fn cost_separate(&self, num_ops: usize, data_size: usize) -> f64
Estimate cost of executing operations separately.
Sourcepub fn cost_fused(&self, num_ops: usize, data_size: usize) -> f64
pub fn cost_fused(&self, num_ops: usize, data_size: usize) -> f64
Estimate cost of executing operations fused.
Sourcepub fn fusion_benefit(&self, num_ops: usize, data_size: usize) -> f64
pub fn fusion_benefit(&self, num_ops: usize, data_size: usize) -> f64
Calculate fusion benefit.
Trait Implementations§
Source§impl Clone for FusionCostModel
impl Clone for FusionCostModel
Source§fn clone(&self) -> FusionCostModel
fn clone(&self) -> FusionCostModel
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 FusionCostModel
impl Debug for FusionCostModel
Auto Trait Implementations§
impl Freeze for FusionCostModel
impl RefUnwindSafe for FusionCostModel
impl Send for FusionCostModel
impl Sync for FusionCostModel
impl Unpin for FusionCostModel
impl UnwindSafe for FusionCostModel
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