Microscaling Blocks - Microscaling Blocks - 2026.1 English - UG1864

Vitis Functional Simulation User Guide (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 English
# mx9 with convergent-to-even rounding
data = np.random.randn(32).astype(np.float32)
mx   = va.array(data, dtype=va.mx9(roundingMethod=12))
np.asarray(mx)      # quantized, then dequantized back to float32

The total number of elements in the array must be a multiple of 16 (scalars and arbitrary multi-D arrays whose flat length is not a multiple of 16 are rejected). Slicing must select one or more complete 16-element blocks aligned on a block boundary:

mx[0:16]     # OK, full block
mx[16:32]    # OK, another full block
mx[:16]      # OK
mx[1:16]     # IndexError — not aligned on a block
mx[:5]       # IndexError — not a full block
mx[16]       # IndexError — element-level indexing not allowed