-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
CudaDevice::htod_copy_into
is unsound
#314
Comments
Ah are you saying this because we overwrite the first owned vec with the 2nd I supposed that's true. Perhaps we should add: if self.host_buf.is_some() {
self.synchronize()?;
} |
You could also do it by making an event when you copy, storing it in the Also, now that I think about it, I probably wasn't able to cause issues with this since copies from unpinned memory (in the CUDA sense) are always synchronous, and |
Oh yeah good points. For future reference: while we are using rust side pins, this is not the same as cuda side pinned memory (which requires you used a specific api to allocate the memory #80 ). |
If two
htod_copy_into
s to the same CudaSlice are issued in quick succession, the source for the first copy may be freed before it completes. I haven't been able to find an example that behaves incorrectly because of this, though.The text was updated successfully, but these errors were encountered: