Optimized rocm specific multicast transpose kernel #586
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 630 lines diff across 7 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.386
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #586"
general
weight: 0.35
aris134
Optimizes the multi_cast_transpose kernel for rocm.
Benchmark Results
Qwen has 128 experts, DS has 256 experts. Benchmarked with shapes derived from MBS={1,2,4}
Balanced Experts
| Benchmark | Base us | Base TiB/s | Opt us | Opt TiB/s | % Peak | Speedup |
|---|---|---|---|---|---|---|
| 128exp/4096cols/MBS1 | 668 | 0.75 | 140 | 3.58 | 49.2% | 4.77x |
| 128exp/4096cols/MBS2 | 1147 | 0.86 | 248 | 3.99 | 54.8% | 4.63x |
| 128exp/4096cols/MBS4 | 2388 | 0.82 | 478 | 4.12 | 56.6% | 5.00x |
| 128exp/1536cols/MBS1 | 281 | 0.67 | 54.8 | 3.44 | 47.3% | 5.13x |
| 128exp/1536cols/MBS2 | 592 | 0.63 | 101 | 3.67 | 50.4% | 5.86x |
| 128exp/1536cols/MBS4 | 934 | 0.79 | 191 | 3.86 | 53.1% | 4.89x |
| 128exp/3072cols/MBS1 | 548 | 0.69 | 102 | 3.71 | 51.0% | 5.37x |
| 128exp/3072cols/MBS2 | 904 | 0.82 | 204 | 3.65 | 50.2% | 4.43x |
| 128exp/3072cols/MBS4 | 1763 | 0.84 | 371 | 3.98 | 54.7% | 4.75x |
| 256exp/7168cols/MBS1 | 1621 | 0.56 | 289 | 3.13 | 43.0% | 5.61x |
| 256exp/7168cols/MBS2 | 2251 | 0.78 | 519 | 3.39 | 46.6% | 4.34x |
| 256exp/7168cols/MBS4 | 4289 | 0.81 | 861 | 4.03 | 55.4% | 4.98x |
| 256exp/2048cols/MBS1 | 489 | 0.53 | 83.5 | 3.08 | 42.3% | 5.86x |
| 256exp/2048cols/MBS2 | 765 | 0.66 | 147 | 3.41 | 46.9% | 5.20x |
| 256exp/2048cols/MBS4 | 1251 | 0.79 | 267 | 3.71 | 51.0% | 4.69x |
| 256exp/4096cols/MBS1 | 949 | 0.55 | 168 | 3.07 | 42.2% | 5.65x |
| 256exp/4096cols/MBS2 | 1235 | 0.81 | 315 | 3.20 | 44.0% | 3.92x |
| 256exp/4096cols/MBS4 | 2417 | 0.82 | 533 | 3.72 | 51.1% | 4.53x |
Skewed routing
| Benchmark | Base us | Base TiB/s | Opt us | Opt TiB/s | % Peak | Speedup |
|---|---|---|---|---|---|---|
| 128exp/4096cols/MBS1 | 810 | 0.62 | 137 | 3.69 | 50.7% | 5.91x |
| 128exp/4096cols/MBS2 | 1335 | 0.74 | 273 | 3.63 | 49.9% | 4.89x |
| 128exp/4096cols/MBS4 | 2660 | 0.74 | 513 | 3.83 | 52.6% | 5.19x |
| 128exp/1536cols/MBS1 | 349 | 0.54 | 53.2 | 3.55 | 48.8% | 6.56x |
| 128exp/1536cols/MBS2 | 635 | 0.59 | 87.6 | 4.24 | 58.3% | 7.25x |
| 128exp/1536cols/MBS4 | 1108 | 0.67 | 202 | 3.66 | 50.3% | 5.49x |
| 128exp/3072cols/MBS1 | 644 | 0.59 | 94.1 | 4.01 | 55.1% | 6.84x |
| 128exp/3072cols/MBS2 | 1136 | 0.65 | 210 | 3.54 | 48.7% | 5.41x |
| 128exp/3072cols/MBS4 | 2049 | 0.72 | 389 | 3.79 | 52.1% | 5.27x |
| 256exp/7168cols/MBS1 | 1676 | 0.54 | 310 | 2.91 | 40.0% | 5.41x |
| 256exp/7168cols/MBS2 | 2732 | 0.64 | 496 | 3.55 | 48.8% | 5.51x |
| 256exp/7168cols/MBS4 | 4674 | 0.74 | 928 | 3.74 | 51.4% | 5.04x |
| 256exp/2048cols/MBS1 | 635 | 0.41 | 87.9 | 2.93 | 40.3% | 7.22x |
| 256exp/2048cols/MBS2 | 933 | 0.54 | 141 | 3.56 | 48.9% | 6.62x |
| 256exp/2048cols/MBS4 | 1560 | 0.64 | 272 | 3.65 | 50.2% | 5.74x |
| 256exp/4096cols/MBS1 | 1039 | 0.50 | 185 | 2.79 | 38.3% | 5.62x |
| 256exp/4096cols/MBS2 | 1644 | 0.61 | 292 | 3.44 | 47.3% | 5.63x |
| 256exp/4096cols/MBS4 | 2728 | 0.73 | 534 | 3.71 | 51.0% | 5.11x |
Performance Summary
Average speedup (balanced): 5.0x
Average speedup (skewed): 5.8x
Average % peak (balanced): 49.4%
Average % peak (skewed): 49.0%
Change Summary
Vec::store_towhich pollutes L2 (CDNA4 L2 is write-allocate)rocm_pack_4xfloat8— 2v_cvt_pk_fp8_f32per 4 values vs upstream's scalarOType(scale * x)castsrocm_block_reduce_maxwithrocm_atomicMaxFloat— usesatomicMaxon int-reinterpreted float (single instruction) vs upstream's CAS looptile_m = local_bid % tiles_mfor L2 input locality<details>
<summary>Rejected/skipped optimizations (click to expand)</summary>
</details>