-
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
Replace cudf::detail::copy_if logic with thrust::copy_if and gather #17520
Replace cudf::detail::copy_if logic with thrust::copy_if and gather #17520
Conversation
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. |
/ok to test |
/ok to test |
I modified the
The string-only columns were all faster (except for the 100% case). The original code performed a copy-if/gather on the individual columns where this change employs copy-if/gather on the entire table. I gather that gather handles multiple columns more efficiently and there is no reason duplicate that logic.
Finally, when the hits % is low (<50%), the new code runs faster overall.
Above 50%, the performance improvement is not as significant and less consistent:
And there are specific cases where fixed-width only input tables are not faster for hits >= 80% and 10M rows.
Note the percentages are high here but the diff time is only 20-25 microseconds. |
/ok to test |
/ok to test |
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.
A small question otherwise looks great.
I’m not too concerned about the slight performance regression, as thrust will take care of it if it really matters.
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.
Oh this is great indeed. The approach is much cleaner 👍
/merge |
3468e92
into
rapidsai:branch-25.02
Description
Replaces the custom kernels for
cudf::detail::copy_if
with a call tothrust::copy_if
to build indices to callcudf::detail::gather
.This is easier to maintain and faster for some cases but slower in others.
Checklist