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 bf16 from from numpy. #19825

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

AWoloszyn
Copy link
Contributor

Not submitting until I can actually find the documentation for 'g'.

@AWoloszyn AWoloszyn requested a review from benvanik as a code owner January 27, 2025 20:46
Not submitting until I can actually find the documentation for 'g'.

Signed-off-by: Andrew Woloszyn <[email protected]>
@benvanik
Copy link
Collaborator

benvanik commented Jan 27, 2025

There's a few things you'll have to do, probably.

https://github.com/GreenWaves-Technologies/bfloat16/blob/97e0bab610569f5be550aee1526e94131905ac01/bfloat16.cc#L451 is a definition - there's no official support so it's a hack everywhere.

But matching with what pytorch does is the important part. You'll want to get a file dumped from there (as in pytorch/pytorch#143042) and add a test for it. iree/tooling/testdata/npy/ has the script that generates the npy files and numpy_io_test.cc has the tests that verify them (we may have to just check that in, as the script that generates in there is just plain numpy).

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