PR #21380: Add F4E2M1FN and F8E8M0FNU types #21392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #21380: Add F4E2M1FN and F8E8M0FNU types
Imported from GitHub PR #21380
Previous PR #19096 was rolled back, re-trying.
This PR adds F4E2M1FN primitive type (4-bit float with 2 bits exponent and 1 bit mantissa), F8E8M0FNU primitive type (8-bit float with 8 bits exponent, no mantissa and no sign) and enables loads/stores in the same way S4/U4 type is implemented.
This will enable using microscaling (MX) formats (RFC), such as MXFP4.
Related PRs:
float8_e8m0_fnu
(E8M0) OCP MX scale format jax-ml/ml_dtypes#166Copybara import of the project:
--
d7e00c4 by Sergey Kozub skozub@nvidia.com:
Add F4E2M1FN and F8E8M0FNU types
Merging this change closes #21380
FUTURE_COPYBARA_INTEGRATE_REVIEW=#21380 from openxla:skozub/e2m1_e8m0 d7e00c4