Rounding behavior of float8_e8m0fnu
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 361
- Forks
- 60
- Avg merge
- 18h 41m
- Merged PRs (30d)
- 3
Description
e8m0 serves as the common scale type for MX (microscaling) formats, however, different libraries have adopted different rounding behaviors, see summarized in this table

Although rounding to nearest is the common behavior for other floating point types, when used in MX formats it has been shown that rounding up with saturation is the most beneficial for training accuracy: https://arxiv.org/abs/2506.08027. As a result, this has been chosen as the default in the cuda spec.
I'm wondering if ml-dtypes has plans to update the rounding behavior or expose different rounding modes?
Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue concerns rounding behavior for float8_e8m0fnu in MX formats, but it names no implementation files or tests. First clarify whether the goal is to change the default, expose selectable rounding modes, or both; completion should be defined by an agreed behavior aligned with the relevant specification and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100