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

Improve aggregation device functors #16884

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

PointKernel
Copy link
Member

@PointKernel PointKernel commented Sep 24, 2024

Description

While working on #16619, I noticed that aggregate_row is always instantiated with the same template values, making the template parameters unnecessary. This PR simplifies the function by removing the template parameters and moving the device aggregators to their own header. This is a preparatory step for #16619, where additional overloads of the device aggregators will be introduced.

Checklist

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

@PointKernel PointKernel added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Sep 24, 2024
@PointKernel PointKernel self-assigned this Sep 24, 2024
@PointKernel PointKernel marked this pull request as ready for review September 28, 2024 01:19
@PointKernel PointKernel requested a review from a team as a code owner September 28, 2024 01:19
@PointKernel PointKernel added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Sep 28, 2024
Copy link
Member

@mhaseeb123 mhaseeb123 left a comment

Choose a reason for hiding this comment

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

Minor comments. LGTM otherwise!

cpp/src/aggregation/aggregation.cu Show resolved Hide resolved
Copy link
Contributor

@davidwendt davidwendt left a comment

Choose a reason for hiding this comment

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

Looks good.
I see there are a bunch of cudf::detail::atomic* calls here. Do we have an issue to remove these in favor of cuda::std::atomic?

@PointKernel
Copy link
Member Author

Do we have an issue to remove these in favor of cuda::std::atomic?

Good question.

We have #13575 tracking potential cleanups with cuda::atomic_ref, but it turns out to be unfeasible. atomic_ref is meant for 4B/8B integers and floats, whereas cudf needs to support types like durations, booleans, and timestamps, etc. Therefore, we can't fully get rid of cudf::detail::atomic. I’ll add a comment in #13575 to clarify the scope for future work.

@PointKernel
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit f9567a5 into rapidsai:branch-24.12 Oct 1, 2024
115 checks passed
@PointKernel PointKernel deleted the cleanup-device-aggs branch October 1, 2024 17:29
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 improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants