Skip to content

Conversation

@Micky774
Copy link
Contributor

Description

Enables MXFP8 support in the TE JAX integration and significantly modifies tests to account for remaining support gaps

TODO:

  • Investigate grouped-GEMM test failures for MXFP8
  • Investigate newly exposed failures in test_layernorm_mlp_grad{_shardy} when using hipblaslt GEMM + bias + no scaling + bf16 dtype

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Adds new test cases to tests/jax/test_custom_call_compute.py
  • Corrects comparison bug in test_custom_call_compute::assert_bitwise_scaled_tensors
  • Removes dtype-based skip on MXFP8 GEMMs in test_custom_call_compute
  • Adds shape-based skips for MXFP8 GEMMs across several files
  • Added bias parameterization to test_dense_grad_fp8 to allow testing of MXFP8 (currently does not support bias)
  • Updated tests/jax/test_distributed_layernorm_mlp.py with new test shape to allow for MXFP8 usage
  • Added xfail to certain configs that fail with the new test case (needs a follow-up investigation)
  • Added explicit shape checks to transformer_engine/common/gemm/rocm_gemm.cu
  • Removed IS_NORM template parameter from cast_mxfp8_2D_kernel
  • Disabled scale_inv swizzling before GEMM on ROCm
  • Corrected scale_inv un-padding behavior in NormFwdPrimitive
  • Removed redundant un-padding in NormFwdPrimitive
  • Removed swizzling in GroupedGemmFFI
  • Skipped grouped GEMM MXFP8 tests due to outstanding failures (needs follow-up investigation)
  • Corrected bias bug in transformer_engine/jax/layernorm_mlp.py

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Micky774
Copy link
Contributor Author

Note that the CI failure is unrelated.

Copy link
Collaborator

@wangye805 wangye805 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still many other places needs rocm specific guards

Copy link
Collaborator

@wangye805 wangye805 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wangye805 wangye805 merged commit fc2caf5 into dev Jan 30, 2026
2 checks passed
@Micky774 Micky774 deleted the zain/jax-mxfp8 branch January 30, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants