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 groupby argmin/max gather of sorted-order indices #17591

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Fixes the gather logic in groupby_argmin.cu and groupby_argmax.cu that gathers the sorted-order indices from the results of the groupby reduction functions. The resulting indices must be remapped to the sorted-order indices before returning. The gather call has been fixed to use an output vector since the gather documentation indicates the map and result iterators must not overlap.
Also, the gather_if is not needed since the groupby reduction does not use the min/max sentinel values in its logic.

Closes #16542

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 Dec 13, 2024
@davidwendt davidwendt self-assigned this Dec 13, 2024
Copy link

copy-pr-bot bot commented Dec 13, 2024

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.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Dec 13, 2024
@davidwendt davidwendt marked this pull request as ready for review December 13, 2024 19:16
@davidwendt davidwendt requested a review from a team as a code owner December 13, 2024 19:16
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few typos but the content seems fine to me.

cpp/src/groupby/sort/group_argmax.cu Outdated Show resolved Hide resolved
cpp/src/groupby/sort/group_argmax.cu Outdated Show resolved Hide resolved
cpp/src/groupby/sort/group_argmin.cu Outdated Show resolved Hide resolved
@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 0f1bae8 into rapidsai:branch-25.02 Dec 20, 2024
106 checks passed
@davidwendt davidwendt deleted the argminmax-gather branch December 20, 2024 14:53
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
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] result indices in group_argmin was not initialized to -1 as comment says
3 participants