-
Notifications
You must be signed in to change notification settings - Fork 170
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
Provide stream-aware containers #823
Comments
I don't think it will be possible/wise to make them stream aware in a safe and easy way. These entities try and emulate a normal pointer and reference where there is no opportunity to inject a stream. For example While there is no arguing that they are convenient, their convenience can be a tremendous footgun for both stream ordering and hiding host/device copies. This is why RMM's There is certainly room for improvement with stream-ordered data structures in Thrust and beyond. This is something that @griwes will be thinking about and working on in the medium-term future. |
No need to make device_vector::operator[] to take a stream. The device_vector should provide a constructor with stream-aware (or execution policy) like device_uvector, and then device_ptr or its base class should hold the associated stream to make data access to be stream-aware. |
device_ptr
and device_reference
are not stream-aware
I'll keep this issue open for now, but it's likely that we'll solve this problem in libcu++ and not Thrust. |
device_ptr
anddevice_reference
use the stream provided by the CUDA system (probably the default stream, though I didn't check). That means that there is no (to me obvious) way to use them safely with thepar_nosync
execution policy or in other non-default stream contexts. They are a really convenient tool for copying single values between host and device, so it would be really helpful if we could find a way to make them stream-aware, or provide a stream-aware alternative.This issue came up in rapidsai/cudf#11919 (comment)
The text was updated successfully, but these errors were encountered: