Skip to main content

array_passes

Function array_passes 

Source
pub fn array_passes(ty: GgmlType) -> Option<u32>
Expand description

Passes of the 4-bit array one weight of ty takes, or None for a type the array does not read.

A block format stores an unsigned code per weight (a signed one is offset by half its range) and per-block scales the block-scale unit applies after the integer sum. Codes of up to four bits are one pass. Five- and six-bit codes split into a 4-bit low digit and a high digit, and eight-bit codes (Q8_0, and the int8 table values IQ4 indexes) into two 4-bit digits: two passes, recombined exactly as lo + 16·hi.