Skip to main content

Module minifloat

Module minifloat 

Source
Expand description

Software fp8 conversion, on u32 bit patterns only so that a backend with no 8- or 16-bit types can still call it on the bits in a word.

Modules§

f32_to_fp8_bits
f32_to_ue8m0_bits
fp8_bits_to_f32
ue8m0_bits_to_f32

Structs§

LowerMinifloatCast
Lowers every cast from or to an fp8 format the backend does not convert natively onto the software polyfill, through f32.
LowerMinifloatCompare
Lowers fp8 equality onto the lanes’ bit patterns.

Enums§

Fp8Container
How a backend without a native fp8 type holds the bytes of an fp8 vector.

Functions§

f32_to_fp8_bits
Round to nearest even; overflow and infinities saturate to the largest finite value, as the host codecs do.
f32_to_ue8m0_bits
Encode to ue8m0, rounding up to the next power of two and saturating at both ends.
fp8_bits_to_f32
Bits above the low byte are ignored.
ue8m0_bits_to_f32
Decode ue8m0 codes: a bare exponent, so the code is the f32 exponent field.

Type Aliases§

LowerMinifloatCastPass
LowerMinifloatComparePass