IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

e2m1x8_scaled_to_e4m3x8

def e2m1x8_scaled_to_e4m3x8(word: UInt32, sf2: UInt32) -> SIMD[.uint32, 2]

Converts eight e2m1 (element 0 in the low nibble) times a broadcast f16 scale pair to eight e4m3 bytes, through the hardware converts.

Each byte widens to an f16 pair, mul.f16x2 applies the scale exactly (see e4m3_magnitude_lut_f16), and one convert rounds the pair to e4m3, so the bytes match e2m1x8_to_e4m3x8 for every positive scale.

Returns:

SIMD[.uint32, 2]

Was this page helpful?