Skip to content

Fp8 conversion#2686

Merged
awni merged 7 commits intomainfrom
fp8_conversion
Oct 27, 2025
Merged

Fp8 conversion#2686
awni merged 7 commits intomainfrom
fp8_conversion

Conversation

@awni
Copy link
Copy Markdown
Member

@awni awni commented Oct 20, 2025

  • Adds a primitive and CPU / Metal / CUDA conversion routines for e4m3 fp8.
  • Adds C++ only ops to convert to/from fp8.

I didn't expose these to python because I think we haven't settled on API yet for fp8 (basically should it be a type or not). For now I'm leaning towards not since it has very limited support in other ops and it's not clear we need to expose it.

So for now, fp8 is represented as mx.uint8. So this op is really meant to be used by quantizations (e.g. nvfp4, mxfp8, other block scaled fp8 quants).

@awni awni requested a review from angeloskath October 20, 2025 17:02
@awni
Copy link
Copy Markdown
Member Author

awni commented Oct 20, 2025

CC @nastya236

Copy link
Copy Markdown
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

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

Looks great!

@awni awni merged commit 969924c into main Oct 27, 2025
6 checks passed
@awni awni deleted the fp8_conversion branch October 27, 2025 23:35
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.

2 participants