-
Notifications
You must be signed in to change notification settings - Fork 915
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
Implement stable version of cudf::sort
#15066
Conversation
I suppose I should add some tests. I can write ones that check that the result is correct, but is there any way to check that the non-stable sort would not have produced that result? |
cudf::sort
`cudf::sort
A single round of the cudf-python tests failed due to not raising pandas warnings where we expect to. But I would have thought this should also happen on different CTK versions, so no idea what is going on. |
Although you cannot really verify the results are stable, tests are helpful in case this diverges in the future and we want to make sure it doesn't just fail sorting in general. |
3709f57
to
8eee62c
Compare
c136426
to
809cca1
Compare
Thanks @davidwendt, I think this is ready for another look when you have the time. |
Added tests, and fixed a two-year-old bug that meant that we weren't testing stable_sort_by_key in a bunch of the stable_sort tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thanks for fixing the tests too.
We should pass the provided stream on to sort_by_key.
Unify template parameter for stable sort as a sort_method enum member rather than bool.
In the stable sort case, we do have guarantees on the order of the resulting table, so additionally remove the misleading comments that were carried over from when the tests were of unstable sorting.
Previously we were testing sort_by_key.
Additionally add tests of single column stable sorts which exercise fast-path code.
d7ab2e2
to
8e13cdd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the names of the enums and the is_usable()
as well.
/merge |
Description
Adds an implementation of
cudf::stable_sort
. While here, cleans up a few small issues around stream-passing and memory resource usage in the detail APIs of some of the sort functions.cudf::stable_sort
#15065Checklist