[TE] CK small-seq: fix the saved LSE layout and skip unsupported configs #784
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 266 lines diff across 3 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.334
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #784"
general
weight: 0.35
VeeraRajasekhar
Description
Found while adding max-logit support on CK (#755), where a regular forward can be followed by the small-seq
backward, which gave wrong gradients. Existing tests missed it: the small-seq forward and backward undo each
other's permutation, and the test data gives nearly the same LSE in every head.
Fixes the opt-in CK small-seq kernels (
NVTE_FUSED_ATTN_CK_SMALLSEQ=1, #625), which gave wrong results:[tokens, h], the remap read[h, tokens].cu_seqlens, which these kernels ignore, so shortercu_seqlensmisplaced the saved LSE.
can't handle them. They now run the regular CK kernels.
Type of change
Changes
pad_remap_lse: token-major option for the small-seq LSE, covering allb*s_qrows for BSHD.is_small_seq_supported_static: also takes the layout and window, and rejects the configs above.test_ck_smallseq_lse(now also BSHD with shortercu_seqlens) andtest_dpa_ck_smallseqfail before andpass after.
Checklist: