[AMDGPU][GlobalISel] Select v_cvt_pk_bf16_f32 for bf16 fptrunc #242847
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.32) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 134 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.293
Real PR Conversation Timeline
1 comments
"Review active on #242847"
general
weight: 0.35
jayfoad
On targets with bf16 conversion instructions (gfx950, gfx1250), GlobalISel always expanded f32 -> bf16
G_FPTRUNCinto the integer rounding sequence (v_bfe/v_add3/NaN select/shift), while SelectionDAG selectsv_cvt_pk_bf16_f32.G_FPTRUNC{bf16, f32}and{<2 x bf16>, <2 x f32>}legal whenhasBF16ConversionInsts(). f64 -> bf16 is still lowered (round-to-odd to f32), and its final step now also uses the native instruction.bf16_fproundPatFrag, which existed only to disable these patterns for GlobalISel. Its FIXME (GlobalISel cannot distinguish f16 and bf16) no longer applies with extended LLTs.G_FPTRUNC. Without it, targets with SALU float (gfx1250) matched the uniform 16-bit SGPR rule and failed to select, since there is no scalar f32 -> bf16 conversion.PackB32Patto f16 elements in GlobalISel. Its v2f16 type check also accepted v2bf16, andv_pack_b32_f16is not a plain bit move for bf16 values (this also affected bf16 log2/sqrt on gfx1250 fake16).