jax
227b4e8d - Add testScaledDotGeneralPackedAxis for fp4 packing axis

Commit
2 days ago
Add testScaledDotGeneralPackedAxis for fp4 packing axis XLA emits mxfp4 scaled dots with the RHS packed along N (rhs_k_pack = false). On AMD GPUs without native scaled MFMA/WMMA, Triton's DecomposeAMDScaledBlocked unpacked fp4 along K regardless of k_pack, so testScaledDotGeneral6-11 returned wrong values; those tests only show it as a tolerance failure on random data. The new test uses the same shapes and dimension numbers with a selector lhs and a diagonal rhs of exact e2m1 values, so every output is a single exact product and the result is compared bit for bit. An operand unpacked along the wrong axis shows up as nonzeros off the diagonal. It fails until the Triton fix (ROCm/xla triton-amd-fp4-kpack) is in the XLA pin.
Author
Committer
Parents
Loading