Repository navigation
Bound HashCSR groupby build kernel registers on Ampere and Hopper - #24747
rapids-bot[bot] merged 4 commits into
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. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Architecture-conditional launch bounds cpp/src/groupby/hash/hash_csr_kernels.cuh |
The kernel declaration applies a five-block-per-SM launch bound on CUDA architectures 800–999. Its parameters remain unchanged. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Suggested reviewers: asuhan
Merge Risk: 
Minimal · up to 5665f
-
No actionable merge-blocking risk was identified in this focused change.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
mhaseeb123
left a comment
There was a problem hiding this comment.
Speedups look good enough and the change within the directive seems small enough to justify.
|
/merge |
Description
Followup of #24050
This PR adds
__launch_bounds__(hash_csr_block_size, 5)tohash_csr_build_kernelon Ampere and Hopper, which fixes most of the HashCSR groupby slowdown on Hopper.Before Blackwell, NVVM compiles this kernel to 121 registers (252 with nested keys), so only two blocks fit per SM. The same source compiles to 48 to 56 registers on Blackwell. The kernel is latency bound, so at 100K groups it takes 3.9 ms on GH200 and 1.4 ms on B200. This is codegen rather than tuning: every CTK from 12.6 to 13.3 shows the same split, and sm_90 PTX assembled for sm_100 still needs 121 registers. With the bound, sm_80 to sm_90 compile to 48 registers and fit five blocks per SM, at the cost of some spills.
The bound is applied per device pass through
__CUDA_ARCH__because any bound changes Blackwell codegen.(256, 4)raises sm_100 from 48 to 64 registers, and even(256, 1)raises it to 76. Blackwell SASS is unchanged. Turing is excluded because it cannot fit five 256-thread blocks per SM.GROUPBY_NVBENCHon GH200, GPU time vsmain:groupby_max_cardinalitygroupby_maxsumgroupby_m2_var_stdcomplex_int_keysgroupby_struct_keysChecklist