Conversation
| #[cfg(feature = "cuda")] | ||
| unsafe impl ValidAsZeroBits for Complex {} | ||
| #[cfg(feature = "cuda")] | ||
| unsafe impl DeviceRepr for Complex {} |
There was a problem hiding this comment.
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.
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