Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bf16 datatype to sfnp #914

Merged
merged 6 commits into from
Feb 13, 2025
Merged

Add a bf16 datatype to sfnp #914

merged 6 commits into from
Feb 13, 2025

Conversation

KyleHerndon
Copy link
Contributor

I don't fully understand the surrounding code, but I made this thin wrapper and it seems to mostly work. Let me know if you see any glaring issues, because I'm debugging Flux BF16 on top of this and can't pinpoint the issue.

It probably makes sense to move the type definition to another file, I was just hacking on it. Trying to figure out where things belong too.

(For reference I tried working with the __bf16 clang type, but it didn't have enough support so I decided to make this from scratch/uint16 instead)

@KyleHerndon KyleHerndon changed the title Add a bf16 datatype to sfnp WIP: Add a bf16 datatype to sfnp Feb 5, 2025
@KyleHerndon
Copy link
Contributor Author

We determined the numerical issue is elsewhere. This is ready for review.

@KyleHerndon KyleHerndon changed the title WIP: Add a bf16 datatype to sfnp Add a bf16 datatype to sfnp Feb 12, 2025
Copy link
Contributor

@monorimet monorimet left a comment

Choose a reason for hiding this comment

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

LGTM. Can we add the case to the sfnp op/dtype tests where applicable?

@KyleHerndon KyleHerndon merged commit af8ee1c into main Feb 13, 2025
36 of 38 checks passed
@KyleHerndon KyleHerndon deleted the bf16 branch February 13, 2025 01:43
monorimet pushed a commit that referenced this pull request Feb 13, 2025
Add bf16 datatype, functions, and tests
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