interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / docs / models / MXFMT.md

120 lines · 6949 bytes Raw Blame History Source

FP8, NVFP4 and MX block dot product units

Three Omega units sit beside native/models/mxfp4.om. They use integer bit operations only (nvfp4scale alone does one binary32 division) and touch no device.

native/models/fp8.om: OCP OFP8 E4M3 and E5M2

The units follow the OCP 8-bit Floating Point Specification (OFP8) rev 1.0, 2023-12-01.

native/models/nvfp4.om: NVFP4

NVFP4 elements are E2M1 (0, 0.5, 1, 1.5, 2, 3, 4, 6), with one unsigned E4M3 (UE4M3) scale per 16 elements.

native/models/mxdot.om: block-scaled dot product and C = A·Bᵀ

mxmm a sa b sb c d computes C = A·Bᵀ in binary64. A is m×k and B is n×k, both K-contiguous (the TN layout of cuBLASLt block-scaled GEMM). d = (fmt, m, n, k). A dot product is the case m = n = 1.

fmtelementsblockscale
0NVFP4 (E2M1)16UE4M3
1MXFP4 (E2M1)32E8M0
2MXFP8 E4M332E8M0

How each entry of C is computed:

Check

python3 tests/models/mxfmt-check.py <omc>

References:

Coverage:

Observed on the DGX Spark host (aarch64), 2026-10-27. Load average was about 17 during the run (nice 19, cores 8-9), which does not affect exactness.

compiler_sha256=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f
fp8.om_sha256=1baf86cbf966faf948913a30e10612ffcfeeed08f382f46c59fcd7539808bfad
nvfp4.om_sha256=5782686136803d3e19fa485bbe40630a0ff9bf22245c806744ed9095497abfed
mxdot.om_sha256=005f6e13490b33206f333bc04251e0d4d78cff200646cfa85afa85140af550e1
numpy=2.5.4 ml_dtypes=0.5.1
FP8 decode exhaustive: 512 codes (E4M3 256, E5M2 256) == ml_dtypes == OFP8 5.1 formula; Table 2 rows checked
FP8 encode e4m3/e5m2 sat=0/1: 12648448 inputs each (65536 bfloat16 vs exact spec + ml_dtypes; 12582912 structured binary32 vs ml_dtypes); round trip 256 codes
NVFP4 decode exhaustive: 2032 element x scale pairs (16 x 127) == ml_dtypes product == exact
NVFP4 encode: 8290814 (non-NaN bfloat16 x 127 scales); threshold +-1ulp Fraction check; round trip 2016
NVFP4 block scale: 232641 amax values; block encode 20000 blocks
MX dot/matmul: 600 cases, 33600 dot products, error <= gamma(nb-1) sum|t| for all; 33600 bit-equal to left-to-right binary64; worst err/sum|t| = 3.346e-16
refusals: 275
NEG (6 controls) rejected
GPU: NOT_RUN

The full receipt, including the candidate executable hashes, is in the check output.

Not run: