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

Add compute_shared_memory_aggs used by shared memory groupby #17162

Merged
merged 15 commits into from
Oct 31, 2024

Conversation

PointKernel
Copy link
Member

Description

This work is part of splitting the original bulk shared memory groupby PR #16619.

This PR introduces the compute_shared_memory_aggs API, which is utilized by the shared memory groupby. The shared memory groupby process consists of two main steps. The first step was introduced in #17147, and this PR implements the second step, where the actual aggregations are performed based on the offsets from the first step. Each thread block is designed to handle up to 128 unique keys. If this limit is exceeded, there won't be enough space to store temporary aggregation results in shared memory, so a flag is set to indicate that follow-up global memory aggregations are needed to complete the remaining aggregation requests.

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 the CMake CMake build issue label Oct 24, 2024
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Oct 24, 2024
@PointKernel PointKernel added non-breaking Non-breaking change feature request New feature or request labels Oct 24, 2024
@PointKernel PointKernel marked this pull request as ready for review October 24, 2024 00:18
@PointKernel PointKernel requested review from a team as code owners October 24, 2024 00:18
@PointKernel PointKernel self-assigned this Oct 24, 2024
@PointKernel PointKernel added the 3 - Ready for Review Ready for review by team label Oct 24, 2024
@GregoryKimball
Copy link
Contributor

@davidwendt would you please take another pass over this PR?

@@ -23,6 +23,91 @@
#include <cuco/static_set_ref.cuh>

namespace cudf::groupby::detail::hash {
// TODO: TO BE REMOVED issue tracked via #17171
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still relevant?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, #17171 should be addressed to avoid code duplication.

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.

Approving CMake. A couple tiny C++ suggestions (non-blocking).

cpp/src/groupby/hash/single_pass_functors.cuh Outdated Show resolved Hide resolved
cpp/src/groupby/hash/single_pass_functors.cuh Outdated Show resolved Hide resolved
@PointKernel
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 0e294b1 into rapidsai:branch-24.12 Oct 31, 2024
102 checks passed
@PointKernel PointKernel deleted the compute-shm-aggs branch October 31, 2024 00:32
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 CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants