Skip to content
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

Fix segmented-sort overlapped input/output indices #16463

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Fixes call to CUB DeviceSegmentedSort::SortPairs where the input and output indices pointed to the same temp memory. The documentation from https://nvidia.github.io/cccl/cub/api/structcub_1_1DeviceSegmentedSort.html#id8 indicates the d_values_in and d_values_out memory must not overlap so using the same pointer for both created invalid output in certain conditions. The internal function was implemented to expect the input values to be updated in-place. The fix uses separate device memory for the input and output indices.

Closes #16455

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Aug 1, 2024
@davidwendt davidwendt self-assigned this Aug 1, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Aug 2, 2024
@davidwendt davidwendt marked this pull request as ready for review August 5, 2024 14:11
@davidwendt davidwendt requested a review from a team as a code owner August 5, 2024 14:11
@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit e8156d4 into rapidsai:branch-24.10 Aug 6, 2024
80 checks passed
@davidwendt davidwendt deleted the list-sort-values branch August 6, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] list.sort_values returning incorrect results in some cases.
3 participants