Fix compile errors from device_scalar constructor signature change. - #5042
Merged
Merged
Conversation
Fixes NVIDIA#5041. rapidsai/rmm#2527 changes the signature of `rmm::decimal_scalar`'s constructor, so as not to take r-value references. `decimal_utils.cu` and `charset_decode.cu` were mistakenly passing r-values to `rmm::decimal_scalar`'s constructor. This is a bug, because there is no guarantee that the r-value would be alive by the time its value is read and copied to device memory. This commit changes the call sites to use l-value references. Note that `stream.sync()`s aren't required here, immediately after the device_scalars are constructed. The source objects remain alive for the copy, and there are stream syncs downstream (e.g. flag->value(stream)). Signed-off-by: MithunR <mithunr@nvidia.com>
Contributor
Greptile SummaryThe PR updates cuDF and RMM revisions to incorporate the revised
Confidence Score: 5/5The PR appears safe to merge, with no concrete correctness, security, or build failure identified in the changed code. The named scalar initializer values remain in scope until downstream synchronized reads, and the dependency and call-site updates consistently address the constructor signature change. Important Files Changed
Reviews (1): Last reviewed commit: "Fix compile errors from decimal_scalar c..." | Re-trigger Greptile |
3 tasks
Collaborator
Author
|
Build |
pmattione-nvidia
approved these changes
Aug 26, 2026
decimal_scalar constructor signature change.device_scalar constructor signature change.
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.
Fixes #5041.
rapidsai/rmm#2527 changes the signature of
rmm::device_scalar's constructor, so as not to take r-value references.decimal_utils.cuandcharset_decode.cuwere mistakenly passing r-values tormm::device_scalar's constructor. This is a bug, because there is no guarantee that the r-value would be alive by the time its value is read and copied to device memory.This commit changes the call sites to use l-value references.
Note that
stream.sync()s aren't required here, immediately after the device_scalars are constructed. The source objects remain alive for the copy, and there are stream syncs downstream(e.g. flag->value(stream)).