Skip to main content

Module fp4

Module fp4 

Source
Expand description

Software e2m1 conversion, kept beside the other minifloat codecs in cubecl_core::post_processing::fp4 and re-exported here for the quantized readers.

Modules§

e2m1_bits_to_float
e2m1_packed_bits_to_float
float_to_e2m1_bits

Functions§

e2m1_bits_to_float
Decode one e2m1 code per lane, held in the low nibble of each lane of code.
e2m1_packed_bits_to_float
Decode the N e2m1 codes packed into the low 4 * N bits of word, lowest nibble first.
float_to_e2m1_bits
Encode one e2m1 code per lane into the low nibble of each lane, rounding to nearest with ties to even and saturating at ±6.