-
Notifications
You must be signed in to change notification settings - Fork 897
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
base: branch-24.12
Are you sure you want to change the base?
Conversation
|
||
size_t dynamic_shmem_size = 0; | ||
CUDF_CUDA_TRY(cudaOccupancyAvailableDynamicSMemPerBlock( | ||
&dynamic_shmem_size, single_pass_shmem_aggs_kernel, active_blocks_per_sm, GROUPBY_BLOCK_SIZE)); |
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 don't think this will change within a process. I wonder if it could be cached by making the variable static?
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.
The return value of this function will be used in another TU as well: https://github.com/PointKernel/cudf/blob/ed9243b83181d15646b46e15e1aa42963131c5f6/cpp/src/groupby/hash/compute_aggregations.cuh#L69
I've updated the code to calculate the available shared memory only once in compute_aggregations
and pass available_shmem_size
as an argument, rather than repeatedly calling the API.
Co-authored-by: David Wendt <[email protected]>
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