Skip to main content

lane_cycles

Function lane_cycles 

Source
pub fn lane_cycles(ty: GgmlType, scaling: ActScaling) -> Option<f64>
Expand description

Cycles a block-scale lane spends on one weight block of ty read against one activation word scaled as scaling, or None for a type the array does not read.

A lane takes a block’s integer sums from the array, multiplies in its sub-block scales and mins (LANE_PRODUCTS a cycle), multiplies by the block’s two scales times the activation scale, sums the two terms exactly, rounds once and adds the result into its row. Activations scaled per 32 elements against a larger block give the block one term per 32 elements, each aligned into the block’s exact sum on its own cycle.