Skip to main content

dequantize_aligned_wide

Function dequantize_aligned_wide 

Source
pub fn dequantize_aligned_wide<Q: Scalar, F: Numeric, NQ: Size, NF: Size>(
    value: Vector<Q, NQ>,
    scale: f32,
    table: ComptimeOption<Box<[f32]>>,
    scheme: QuantScheme,
) -> Vector<F, NF>
Expand description

[dequantize_aligned] for a scale a caller folded in f32, forming the product there too and narrowing only the result.

A folded scale reaches further down than what it produces: one below F’s smallest subnormal still scales quantized values into ordinary F ones. Narrowing it to F first rounds it to zero and takes the whole read with it, which is the failure two-level quantization exists to avoid in the first place.