Repository navigation
[CUB] Fix NVRTC compilation of warp reduction lambdas - #12300
Conversation
Use concrete integer step parameters in the two static_for lambdas. NVRTC 12.9 and 13.1 reject the generic lambdas introduced by NVIDIA#12195, preventing C Parallel and Python reduction kernels from compiling.
|
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 |
|---|---|
Update reduction callback parameter types cub/cub/warp/specializations/warp_reduce_shfl.cuh |
The static_for callbacks in ShuffleReduce and FullShuffleReduce now declare step as int instead of auto. |
Possibly related PRs
- NVIDIA/cccl#12195: This PR introduced the
cuda::static_forreduction lambdas in the same file; this change updates theirstepparameter types.
Suggested reviewers: fbusato, gevtushenko
Priority:
Change: Bug fix
Merge Risk: 
Minimal · previous review cd636
-
No actionable merge-blocking risk is identified in this focused NVRTC compatibility change.
Comment @coderabbitai help to get the list of available commands.
fbusato
left a comment
There was a problem hiding this comment.
waiting for CI and SASS check. auto here represents an integral_constant not a run-time value
This comment has been minimized.
This comment has been minimized.
|
Some data points from reproducing this without a GPU (pip NVRTC wheels, CCCL main f1b40ea):
🤖 Generated with Claude Code |
|
Ran the 🤖 Generated with Claude Code |
|
|
|
@pauleonix I tried that on NVRTC 12.9.86 (sm_89, no GPU needed) and it doesn't compile there:
So keeping The diff of #12262 (clang-tidy plugins, 11 files) doesn't touch these headers; is there another PR number with the fix you mean? If it uses a mechanism that works with NVRTC 12.x, I'd like to look at it. 🤖 Generated with Claude Code |
|
@pylaterreur Yes, sorry, I was too quick to believe it would work. |
fbusato
left a comment
There was a problem hiding this comment.
no SASS differences. Approved
|
/ok to test 35095a1 |
This comment has been minimized.
This comment has been minimized.
🥳 CI Workflow Results🟩 Finished in 4h 36m: Pass: 100%/210 | Total: 9d 20h | Max: 3h 28m | Hits: 27%/1024301See results here. |
NVRTC 12.9 and 13.1 reject the generic lambdas introduced by #12195 as unannotated host functions. This breaks C Parallel and Python reduction, partition, and unique-by-key tests, including CI on #12296.
Use
intstep parameters in bothcuda::static_forlambdas. The existing captures and reduction operations are preserved.Validation
The local NVRTC 12.9 check used CUDA 12.8 headers; the 13.1 check used matching headers. Local execution covers two kernels, not the full type/operator matrix or performance equivalence.
CI status
Full CI is still running. The CUDA 13.4 Python examples job passes all 70 examples, then fails all 125 benchmark fixture setups: pytest-benchmark 5.3.0 accesses
Function._nodeid, which is absent in pytest 9.2.0. This occurs before benchmark execution and is unrelated to the CUB change.Checklist