Skip to main content

Module cost

Module cost 

Source
Expand description

Cost model and latency prediction for kernel operations.

Provides per-op FLOP/memory estimation, roofline analysis, and hardware profile–based latency prediction.

Structs§

HardwareProfile
Hardware profile for roofline analysis.
OpCost
Per-operation cost in terms of compute and memory traffic.

Enums§

Bottleneck
Whether an operation is bottlenecked by compute or memory bandwidth.

Functions§

default_profiles
Return default hardware profiles for known backends.
estimate_activation_cost
Estimate cost for an activation operation with known element count.
estimate_conv2d_cost
Estimate cost with explicit numeric dimensions for a Conv2D pattern.
estimate_elementwise_cost
Estimate cost for an element-wise operation with known element count.
estimate_kernel_cost
Estimate the compute and memory cost of a classified kernel pattern.
estimate_matmul_cost
Estimate cost with explicit numeric dimensions for a MatMul pattern.