Skip to content

[type-classes] 8380667: Prototype FP8_E5M2#2259

Open
jddarcy wants to merge 6 commits intoopenjdk:type-classesfrom
jddarcy:JDK-8380667
Open

[type-classes] 8380667: Prototype FP8_E5M2#2259
jddarcy wants to merge 6 commits intoopenjdk:type-classesfrom
jddarcy:JDK-8380667

Conversation

@jddarcy
Copy link
Copy Markdown
Member

@jddarcy jddarcy commented Mar 25, 2026

First cut at a prototype of an FP8 type, this one with 5 exponent bits and 2 significand (mantissa) bits.

The base conversion functionality is not fully ported over.


Progress

  • Change must not contain extraneous whitespace

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2259/head:pull/2259
$ git checkout pull/2259

Update a local copy of the PR:
$ git checkout pull/2259
$ git pull https://git.openjdk.org/valhalla.git pull/2259/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2259

View PR using the GUI difftool:
$ git pr show -t 2259

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2259.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 25, 2026

👋 Welcome back darcy! A progress list of the required criteria for merging this PR into type-classes will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 25, 2026

@jddarcy This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

[type-classes] 8380667: Prototype FP8_E5M2

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the type-classes branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the type-classes branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title JDK-8380667: Prototype FP8_E5M2 8380667: Prototype FP8_E5M2 Mar 25, 2026
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 25, 2026
@jddarcy jddarcy changed the title 8380667: Prototype FP8_E5M2 [type-classes] 8380667: Prototype FP8_E5M2 Mar 25, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 25, 2026

Webrevs

@jddarcy
Copy link
Copy Markdown
Member Author

jddarcy commented Mar 25, 2026

If reviewers would find it helpful, I can upload here or attach to the bug a result of diffing Float16.java compared to Float8_E5M2.java with "Float16" replaced by a "FLOAT_TYPE" token and likewise for "Float8_E5M2" in its file. This removes many inessential differences between the two files, but is still about 600 lines of changes.

Many of the remaining changes stem from different parameter names, "f16" vs "f8", and the use of "short" vs "byte".

@jddarcy
Copy link
Copy Markdown
Member Author

jddarcy commented Mar 25, 2026

Pushed a small refactoring: the floating-point valued constants are initialized using the valueOf factories rather than setting the bits directly. Checking the setting of the bits is moved to the regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant