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

How can I work with fp16? #447

Open
DavidGOrtega opened this issue Mar 28, 2023 · 4 comments
Open

How can I work with fp16? #447

DavidGOrtega opened this issue Mar 28, 2023 · 4 comments

Comments

@DavidGOrtega
Copy link

DavidGOrtega commented Mar 28, 2023

I have the impression that the library is storing data in fp32, at least doing the math.
Im working with fp16 models mostly.
Its that possible?

@yurymalkov
Copy link
Member

Hi @DavidGOrtega it is possible if you implement the fp16 calculations in C++ and use the C++ interface.
We probably going to add python fp16 support in the near future.

@DavidGOrtega
Copy link
Author

@yurymalkov Im indeed using the C++ code. Would you accept a PR?

@yurymalkov
Copy link
Member

Yeah, that would be great! Thanks!

@DavidGOrtega
Copy link
Author

Im about to tackle it. Did you have something in mind?
My first design would be abstract all the math ops and be able to set the fp in the Algorithm constructor so thats propagated to the math operations and of course the load and save.

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

No branches or pull requests

2 participants