-
Notifications
You must be signed in to change notification settings - Fork 199
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
[FEA] Refactor device_scalar
in terms of device_uvector
and fix asynchrony
#570
Comments
This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. |
This issue has been marked stale due to no recent activity in the past 30d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be marked rotten if there is no activity in the next 60d. |
This PR refactors `device_scalar` to use a single-element `device_uvector` for its storage. This simplifies the implementation of device_scalar. Also changes the API of `device_scalar` so that its asynchronous / stream-ordered methods use the same API style (with explicit stream parameter) as `device_uvector` and `device_buffer`. Closes #570 This is a breaking change. When it is merged, PRs are likely to need to be merged immediately in other libraries to account for the API changes. - [x] cuDF: rapidsai/cudf#8411 - [x] cuGraph: rapidsai/cugraph#1637 - [x] RAFT: rapidsai/raft#259 - [x] ~cuML~ (unused) - [x] ~cuSpatial~ (unused) Authors: - Mark Harris (https://github.com/harrism) Approvers: - Rong Ou (https://github.com/rongou) - Jake Hemstad (https://github.com/jrhemstad) URL: #789
Is your feature request related to a problem? Please describe.
device_scalar
is a convenience type to represent a single value in device memory. Anywhere adevice_scalar
is used, a single elementdevice_uvector
could be used.device_scalar
was implemented beforedevice_uvector
existed, and therefore there is a lot of redundancy between the two.Furthermore, the asynchrony of
device_scalar
is incongrous withdevice_uvector
. Thedevice_scalar::set_value
is asynchronous, but it's name does not tell you that.We've iterated on this quite a bit, and I feel
device_uvector
demonstrates the ideal design. If a function is asynchronous (doesn't synchronize the stream) it should be suffixed with_async
. Otherwise it is synchronous and syncs the stream.Describe the solution you'd like
Refactor
device_scalar
s implementation to be implemented in terms of a single elementdevice_uvector
. Furthermore, reimplement functions likeset_value
in terms ofdevice_uvector::set_element
.Likewise,
device_scalar::set_value
should be made synchronous anddevice_scalar::set_value_async
should be added as an asynchronous variant.The text was updated successfully, but these errors were encountered: