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

unpack_fp6_x32

def unpack_fp6_x32(fragment: SIMD[DType.uint8, SIMDLength(32)]) -> SIMD[DType.uint8, SIMDLength(32)]

Unpacks the 24 payload bytes of a 32-byte fragment into 32 FP6 codes.

Thirty-two elements is one MX block, so this is the natural unit for both the dequant kernel (one E8M0 scale covers exactly this many elements) and an MFMA lane (which holds exactly this many). The 24 payload bytes travel in a 32-byte fragment because SIMD lengths must be powers of two -- the same reason cdna4_block_scaled_mfma declares a 32-byte operand. Bytes 24..31 are ignored.

Args:

Returns:

SIMD[DType.uint8, SIMDLength(32)]: Thirty-two FP6 codes, each in the low 6 bits.