Fix Clang CUDA launch bounds #1969
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 339 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.349
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1969"
general
weight: 0.35
and2049
What problem are you trying to solve?
Kernels using
@wp.kernel(launch_bounds=...)compile through NVRTC but failunder
wp.config.llvm_cudabecause__launch_bounds__is undefined. I foundthis while evaluating the Clang CUDA path; removing the option prevents
comparing the compilers with the same launch-bound constraints.
Closes #1968.
What does this change?
Define
__launch_bounds__in the minimal CUDA runtime using CUDA's attributeexpansion. Add Clang CUDA regression coverage for integer and tuple bounds,
checking kernel results and that the tuple form emits
.maxntid 64and.minnctapersm 2in PTX.Existing pull requests
Validation
passes with it. The PTX assertion also fails when the macro expands to
nothing or forwards only the first argument. All 9 Clang CUDA tests pass
with the revised test.
bundled LLVM 22.1.8.
the 9 NVRTC launch-bounds tests and the launch-bounds occupancy test passed;
a broader targeted run covering CUDA launch options, codegen, and module
handling reported 480 passed and 8 skipped. The production fix is unchanged.
Checklist
mainand contains one commit, unless a maintainer agreed to keep the change as multiple commits.+prefix only for changes that do not require a GitHub issue.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
- Fixed Clang CUDA compilation failures for Warp kernels using
launch_bounds.- Integer and tuple forms of
launch_boundsare supported, including settings for the minimum number of blocks per multiprocessor.- Kernels using these settings can execute with the configured block size and occupancy limits.
- Added CUDA tests verifying that kernels with integer and tuple launch bounds compile and execute correctly.
- Added checks confirming the configured thread and occupancy limits appear in generated PTX.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->