Skip to main content

cost_elementwise_binary_cpu

Function cost_elementwise_binary_cpu 

Source
pub fn cost_elementwise_binary_cpu(
    shapes: &[Shape],
    dtypes: &[DType],
    _params: &OpParams,
    _caps: &BackendCapabilities,
) -> CostEstimate
Expand description

Cost for elementwise binary ops (Add/Sub/Mul/Div/Maximum/Minimum/ Pow/Rem). ~1 FLOP/element (Pow/Rem run higher but the bandwidth dominates for typical sizes); 2 reads + 1 write per element.