FP component housekeeping ahead of the `cuda::` promotion #11738
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 524 lines diff across 6 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.375
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #11738"
general
weight: 0.35
davebayer
FP component housekeeping ahead of the
cuda::promotionNine independent cleanups to the FP component (
<cuda/fpmp>,<cuda/fpemu>,<cuda/fptool>), collected while the component is still incuda::experimentaland the namespace contents are cheap to change. Each commit stands alone and is
reviewable on its own; the list below is in apply order.
Namespace and macro hygiene
_CCCL_FPEMU_EXTRA_BITS. The count of 9was spelled three ways, one of them a bare
EXTRA_BITSthat<cuda/fpemu>leaked into the translation unit and that an
#ifndeflet a user silentlyredefine, changing the emulated arithmetic.
::-qualify every globalcall.
sqrt,sqrtfandfmawere declared inside the namespace, so Clinkage made them aliases of libm; after the promotion
cuda::sqrt(2.0)wouldhave reached libm and any later C++-linkage
cuda::sqrtwould have been a hardconflict.
Public surface
numeric_limitsforfpemu,fpemu_unpackedandfp_custom.Half the FP types previously fell back to the unspecialized primary template.
<cuda/fpmp_math>into<cuda/fpmp>. The split saved a couple ofpercent of compile time on our largest translation unit, which does not justify
a second entry point in the root include directory.
CCCL_ENABLE_FPTOOL. Both fptool types carry mutablestate at namespace scope —
fp_custom's runtime field sizes andfpmp2_stat's counter record — as variable templates, so one copy is sharedacross translation units. An
#includeleft behind after an experiment wouldotherwise carry that state, and the per-operation atomic traffic with it, into
a shipping binary.
Behavior
omit the closing normalization, so their results may carry overlapping limbs,
while mid and high are written against the non-overlap bound on their inputs.
The mixed-accuracy pattern therefore depended on a
renormalize()the callerhad to remember. The conversion now does it; the step is exact, so the number
never changes, only how it is stored. Explicit customer request.
CUDA runtime →
cuda::cuda::copy_bytesin the headers. SixcudaMemcpyAsyncsitesin
fptool_custom.handfptool_stat.h, so the FP headers no longer name aruntime entry point. The three that read a host object which does not outlive
the call now ask for
source_access_order::during_api_call.cuda::. Memory pools and buffers,copy_bytes,cuda::launchandstream.sync()in place ofcudaMalloc,cudaMemcpy,<<<>>>and acudaGetLastErrorcheck after each one, so thetests read the way a user of the component would write them.
the FP examples, and it buys nothing: ptxas reports a 0-byte frame for both
kernels at
-O3, and the-Gbuild has no recursion or indirect calls, so thedriver sizes the stack itself.
Breaking changes
Three items are user-visible:
<cuda/fpmp_math>is removed — include<cuda/fpmp>, which now provides themath functions.
<cuda/fptool>requires-DCCCL_ENABLE_FPTOOL, project-wide. Without it theheader emits an
#errorexplaining why.mixed-accuracy code that previously omitted
renormalize()will producedifferent — better — results.
Testing
Unit tests pass across host, device and NVRTC at C++17 and C++20; examples and
benchmarks build and run. The numerically inert changes were checked by
reproducing prior results rather than only by compiling: the pi benchmark
reproduces its value and digit count at every accuracy level.
Full CI is green on B200, B300, RTX PRO 6000 Blackwell and L40S. GH200 is
currently unavailable and still to run, though nothing here is
architecture-sensitive.