-
-
Notifications
You must be signed in to change notification settings - Fork 98
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 complex numbers #849
base: main
Are you sure you want to change the base?
Add complex numbers #849
Conversation
#[cfg(feature = "cuda")] | ||
unsafe impl ValidAsZeroBits for Complex {} | ||
#[cfg(feature = "cuda")] | ||
unsafe impl DeviceRepr for Complex {} |
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.
We can add these to cudarc in a PR there behind a feature flag, that should allow us to not need the wrapper type, right?
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.
I was unaware that you controlled cudarc. That would work yes.
How does this interact with cuda kernels? |
I don't think it would work at all with cuda kernels atm. Not familiar with how cuda types work, can you overload operators for a custom complex struct? |
We could potentially just merge this for Cpu and make sure we get compile errors for cuda. You can overload operators in c++, but I'm not sure that's sufficient to make the kernels work in the same way as they do in rust land. |
Closes #821.
I had to use a proxy object to implement cuda traits. It built with
cargo build -F complex,cuda,nightly,f16