-
Notifications
You must be signed in to change notification settings - Fork 287
Support the complex64 data type #660
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
Conversation
308ada5 to
e262d9f
Compare
safetensors/src/tensor.rs
Outdated
| /// Complex (32-bit parts) | ||
| Complex64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32-bit parts for complex64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah:
>>> x = torch.zeros(1, dtype=torch.complex64)
>>> x.real.dtype
torch.float32
>>> x.imag.dtype
torch.float32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow didn't parse parts (with an s), which was pretty clear, mb 🙃
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
safetensors/src/tensor.rs
Outdated
| Dtype::BF16 => "BF16", | ||
| Dtype::F32 => "F32", | ||
| Dtype::F64 => "F64", | ||
| Dtype::Complex64 => "Complex64", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way we could keep things in line with what's before "C64" just for consistency's sake ?
Hi guys !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey hey! Hope you are doing great!
Changed to C64, now one can only hope for a type A500 in the future 😁.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a bit confusing to have it be C64 in one place but Complex64 everywhere else imo
992c4ad to
5c07663
Compare
McPatate
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
Warning: not ready for review yet, I just want a CI run :).
What does this PR do?
Fixes # (issue) or description of the problem this PR solves.