refactor: replace rmm::device_scalar with cudf::detail::device_scalar - #23618
Draft
vyasr wants to merge 2 commits into
Draft
refactor: replace rmm::device_scalar with cudf::detail::device_scalar#23618vyasr wants to merge 2 commits into
vyasr wants to merge 2 commits into
Conversation
Introduce a self-contained cudf::detail::device_scalar<T> wrapper (size-1 rmm::device_uvector storage) and migrate all libcudf source, tests, and libcudf_streaming to use it. Updates the scalar hierarchy ctor signatures from rmm::device_scalar<T> to cudf::detail::device_scalar<T> (public API change), refreshes DEVELOPER_GUIDE.md guidance. This completes plan drop-rmm-device-scalar.md. A follow-up change removes the final rmm::device_scalar usage in compute_single_pass_aggs.cuh.
Replace the exemption rmm::device_scalar<cuda::std::atomic_flag> in compute_single_pass_aggs.cuh with rmm::device_uvector<cuda::std::atomic_flag> of size 1 — semantically identical (device_scalar is a size-1 device_uvector under the hood) but eliminates the last direct rmm::device_scalar reference from libcudf source. atomic_flag cannot use cudf::detail::device_scalar because it is not trivially copyable, but device_uvector has no such requirement. Completes plan drop-final-rmm-device-scalar-usage.md.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
bdice
reviewed
Aug 11, 2026
| [[nodiscard]] T const* data() const noexcept { return _storage.data(); } | ||
|
|
||
| private: | ||
| rmm::device_uvector<T> _storage; |
Contributor
There was a problem hiding this comment.
Should we just go straight to cuda::buffer here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces libcudf's direct
rmm::device_scalarusage withcudf::detail::device_scalar, which now owns size-1rmm::device_uvectorstorage directly. Also removes the finalrmm::device_scalar<cuda::std::atomic_flag>use in groupby hash aggregation by using a size-1rmm::device_uvectorinstead. The developer guide is updated accordingly.Checklist