Skip to main content

dot

pub fn dot(row: &CodedRow, act: &ActRow) -> f32
Expand description

The f32 the engine produces for row · act.

Under ActScaling::Sub32: per group of GROUP elements, for every weight segment and every activation block in it, the weight scale’s significand times the activation scale’s m times their exact integer sum, aligned to the group’s least exponent and summed exactly, rounded once; the groups added in order.

Under ActScaling::PerBlock: per weight block, its first scale times the activation scale times the block’s integer sum of coefficients and codes, and its second scale times the activation scale times the integer sum of offset terms and codes, the two summed exactly and rounded once; the blocks added in order.