Fix MoE permutation on gfx1250 w/ Triton 3.8, faster row_id_map #791
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 235 lines diff across 2 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.327
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #791"
general
weight: 0.35
matthiasdiener
Description
Triton 3.8 miscompiles MoE permutation on gfx1250 for multi-warp kernels that apply both
tl.cumsumand a reduction to the same block. Triton 3.9 fixes that miscompilation, but the code is slow on both versions (as well as on gfx950).row_id_map(all AMD GPUs): three new kernels count each expert's tokens per block of tokens, prefix-sum the counts over blocks, then write each block's rows. They read whole token rows, need no sort, and none of them both scans and reduces a block. Therow_id_mapformat is unchanged.unpermute_with_mask_mapunpermutes the probs in a kernel of their own (_unpermute_probs_kernel) instead of in the first hidden blocks of_unpermute_kernel. Other GPUs keep the fused kernel.Performance results: https://github.com/AMD-ROCm-Internal/frameworks-internal/issues/395#issue-6169144290
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: