(x)
| 12 | # therefore I suspect that the discrepancy comes from |
| 13 | # the mxfp8 matmul implementation in cuBLASLt.. |
| 14 | def ulp_bf16_at(x): |
| 15 | ax = mx.abs(x) |
| 16 | min_normal = mx.array(2.0**-126) |
| 17 | ax = mx.where(ax < min_normal, min_normal, ax) |
| 18 | e = mx.floor(mx.log2(ax)) |
| 19 | return mx.power(2.0, e - 7.0) |
| 20 | |
| 21 | |
| 22 | def test_qqmm(): |