-
Notifications
You must be signed in to change notification settings - Fork 143
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
Should HDF5.jl support writing arrays of Float16 type? #301
Comments
It would be fine to support it as long as it can be done unambiguously (for example, in a way that "just works" if you import them in another programming language). If not, then better to use JLD. |
JLD supports them just fine, but doesn't allow to mmap an array of Float16s, because it is an |
Oh, gotcha. I'm definitely fine with adding I should clarify that I won't be implementing this myself, and that it would make a great contribution. |
I guess as long as Julia has consistent format for writing Float16s (which it seems it has), then doing for JLD (which is Julia-specific) shouldn't be a problem. I worked around it by Any idea what would it take to support it natively? It seems like special-casing it and going through |
Nice! To automate this, you could use |
HDF5 allows defining arbitrary floating-point types; see https://www.hdfgroup.org/HDF5/doc/H5.user/Datatypes.html. To write them, one needs to create a new HDF5 atomic datatype (that's a few function calls) specifying how many exponent and mantissa bits there are in a It would similarly be easy to support |
I would be interested in contributing to make |
See #341 |
Right now it doesn't work because
Float16
is not part of theBitsKindOrString
The text was updated successfully, but these errors were encountered: