Rust-GPU / Rust-CUDA

Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.
Apache License 2.0
3.02k stars 115 forks source link

Implement DeviceCopy for feature gated vek types #24

Open beepster4096 opened 2 years ago

beepster4096 commented 2 years ago

Currently, DeviceCopy is only implemented for the vek types not under any features. This is a problem if you need to use any of the feature gated types. For example, I am writing image data from a GPU kernel, so I need to have a DeviceBuffer<vek::Rgb<u8>> to write to and copy from.

beepster4096 commented 2 years ago

Since it was an intentional choice to disable default features on vek, this should be put under its own feature flag in cust.

RDambrosio016 commented 2 years ago

I need to investigate this a bit, vek was causing some issues because cargo's feature selection weirdness was causing weirdness when using it from cpu and gpu, causing it to try and pull in serde on the gpu with catastrophic results. So i had to use vek with no features in cust. This feature selection bug is a nightmare because it sometimes works based on what you build first.