Repository navigation
[Triton/Gluon] [Config] Tune gfx1250 Gluon GEMMs for Kimi-K2 Thinking - #6725
Conversation
Boss2002n
commented
Oct 20, 2026
| Kernel | N | K | M | main (µs) | new (µs) | speedup | main TFLOPS | new TFLOPS | main TB/s | new TB/s |
|---|---|---|---|---|---|---|---|---|---|---|
| MXFP4 preshuffle | 7168 | 8192 | 4 | 15.49 | 4.86 | 3.19x | 30.3 | 96.8 | 2.02 | 6.44 |
| MXFP4 preshuffle | 7168 | 8192 | 8 | 15.59 | 5.14 | 3.03x | 60.3 | 182.6 | 2.01 | 6.09 |
| MXFP4 preshuffle | 7168 | 8192 | 16 | 15.62 | 6.07 | 2.57x | 120.3 | 309.4 | 2.02 | 5.19 |
| MXFP4 preshuffle | 7168 | 8192 | 31 | 15.74 | 7.68 | 2.05x | 231.3 | 473.9 | 2.02 | 4.14 |
| MXFP4 preshuffle | 7168 | 8192 | 32 | 20.81 | 6.89 | 3.02x | 180.6 | 545.3 | 1.53 | 4.61 |
| MXFP4 preshuffle | 7168 | 8192 | 64 | 21.71 | 8.45 | 2.57x | 346.2 | 890.0 | 1.49 | 3.84 |
| MXFP4 preshuffle | 7168 | 8192 | 128 | 22.51 | 8.99 | 2.51x | 667.7 | 1672.9 | 1.49 | 3.74 |
| MXFP4 preshuffle | 7168 | 8192 | 256 | 25.57 | 12.46 | 2.05x | 1176.0 | 2413.1 | 1.41 | 2.89 |
| MXFP4 preshuffle | 7168 | 8192 | 512 | 27.88 | 15.55 | 1.79x | 2157.0 | 3867.8 | 1.46 | 2.62 |
| MXFP4 preshuffle | 7168 | 8192 | 1024 | 29.33 | 21.91 | 1.34x | 4100.1 | 5489.8 | 1.72 | 2.30 |
| MXFP4 preshuffle | 7168 | 8192 | 2048 | 34.62 | 31.48 | 1.10x | 6946.4 | 7641.6 | 2.01 | 2.21 |
| MXFP4 preshuffle | 7168 | 8192 | 4096 | 63.98 | 59.06 | 1.08x | 7518.3 | 8144.9 | 1.68 | 1.82 |
| MXFP4 preshuffle | 7168 | 8192 | 8192 | 121.69 | 110.99 | 1.10x | 7905.9 | 8668.4 | 1.51 | 1.66 |
| MXFP4 preshuffle | 12288 | 1536 | 4 | 4.48 | 3.08 | 1.45x | 33.7 | 49.0 | 2.26 | 3.28 |
| MXFP4 preshuffle | 12288 | 1536 | 8 | 4.57 | 3.16 | 1.45x | 66.1 | 95.5 | 2.24 | 3.24 |
| MXFP4 preshuffle | 12288 | 1536 | 16 | 4.72 | 3.59 | 1.31x | 128.0 | 168.2 | 2.21 | 2.91 |
| MXFP4 preshuffle | 12288 | 1536 | 31 | 4.92 | 3.52 | 1.40x | 237.9 | 332.1 | 2.20 | 3.07 |
| MXFP4 preshuffle | 12288 | 1536 | 32 | 7.53 | 3.50 | 2.15x | 160.4 | 345.3 | 1.44 | 3.10 |
| MXFP4 preshuffle | 12288 | 1536 | 64 | 7.77 | 3.83 | 2.03x | 310.8 | 630.3 | 1.50 | 3.04 |
| MXFP4 preshuffle | 12288 | 1536 | 128 | 8.31 | 4.08 | 2.03x | 581.5 | 1182.8 | 1.60 | 3.25 |
| MXFP4 preshuffle | 12288 | 1536 | 256 | 9.39 | 4.80 | 1.96x | 1028.7 | 2012.4 | 1.76 | 3.44 |
| MXFP4 preshuffle | 12288 | 1536 | 512 | 9.71 | 7.40 | 1.31x | 1990.0 | 2610.4 | 2.37 | 3.11 |
| MXFP4 preshuffle | 12288 | 1536 | 1024 | 10.66 | 9.68 | 1.10x | 3626.5 | 3992.8 | 3.38 | 3.72 |
| MXFP4 preshuffle | 12288 | 1536 | 2048 | 18.12 | 15.44 | 1.17x | 4266.8 | 5007.1 | 3.42 | 4.02 |
| MXFP4 preshuffle | 12288 | 1536 | 4096 | 29.41 | 24.68 | 1.19x | 5257.0 | 6263.7 | 3.88 | 4.62 |
| MXFP4 preshuffle | 12288 | 1536 | 8192 | 55.32 | 46.22 | 1.20x | 5590.2 | 6691.1 | 3.94 | 4.72 |
| MXFP4 preshuffle | 16384 | 512 | 4 | 2.58 | 2.58 | 1.00x | 26.1 | 26.1 | 1.78 | 1.78 |
| MXFP4 preshuffle | 16384 | 512 | 8 | 2.95 | 2.40 | 1.23x | 45.4 | 55.8 | 1.60 | 1.96 |
| MXFP4 preshuffle | 16384 | 512 | 16 | 3.10 | 2.40 | 1.29x | 86.5 | 111.9 | 1.61 | 2.08 |
| MXFP4 preshuffle | 16384 | 512 | 31 | 3.33 | 2.50 | 1.33x | 156.2 | 208.4 | 1.65 | 2.20 |
| MXFP4 preshuffle | 16384 | 512 | 32 | 4.03 | 2.54 | 1.59x | 133.3 | 211.7 | 1.37 | 2.17 |
| MXFP4 preshuffle | 16384 | 512 | 64 | 4.21 | 2.60 | 1.62x | 255.1 | 413.3 | 1.56 | 2.53 |
| MXFP4 preshuffle | 16384 | 512 | 128 | 4.44 | 2.80 | 1.59x | 483.2 | 767.5 | 1.95 | 3.10 |
| MXFP4 preshuffle | 16384 | 512 | 256 | 5.09 | 3.38 | 1.50x | 843.6 | 1268.8 | 2.54 | 3.82 |
| MXFP4 preshuffle | 16384 | 512 | 512 | 5.18 | 4.09 | 1.27x | 1658.0 | 2099.2 | 4.13 | 5.22 |
| MXFP4 preshuffle | 16384 | 512 | 1024 | 5.89 | 5.89 | 1.00x | 2915.3 | 2917.3 | 6.50 | 6.50 |
| MXFP4 preshuffle | 16384 | 512 | 2048 | 10.46 | 9.87 | 1.06x | 3284.6 | 3480.2 | 6.89 | 7.31 |
| MXFP4 preshuffle | 16384 | 512 | 4096 | 20.13 | 19.44 | 1.04x | 3413.8 | 3534.6 | 6.94 | 7.19 |
| MXFP4 preshuffle | 16384 | 512 | 8192 | 38.04 | 38.04 | 1.00x | 3613.3 | 3613.3 | 7.23 | 7.23 |
| FP8 blockscale | 7168 | 8192 | 1 | 42.19 | 7.71 | 5.47x | 2.8 | 15.2 | 1.39 | 7.62 |
| FP8 blockscale | 7168 | 8192 | 4 | 42.42 | 8.45 | 5.02x | 11.1 | 55.6 | 1.39 | 6.96 |
| FP8 blockscale | 7168 | 8192 | 8 | 42.49 | 9.27 | 4.58x | 22.1 | 101.4 | 1.39 | 6.36 |
| FP8 blockscale | 7168 | 8192 | 16 | 42.74 | 10.39 | 4.11x | 44.0 | 180.8 | 1.38 | 5.69 |
| FP8 blockscale | 7168 | 8192 | 32 | 42.95 | 12.04 | 3.57x | 87.5 | 312.1 | 1.38 | 4.94 |
| FP8 blockscale | 7168 | 8192 | 64 | 70.87 | 15.46 | 4.58x | 106.1 | 486.0 | 0.85 | 3.89 |
| FP8 blockscale | 7168 | 8192 | 128 | 120.94 | 22.31 | 5.42x | 124.3 | 673.7 | 0.51 | 2.76 |
| FP8 blockscale | 7168 | 8192 | 256 | 212.81 | 25.84 | 8.24x | 141.3 | 1163.5 | 0.30 | 2.50 |
| FP8 blockscale | 7168 | 8192 | 512 | 402.53 | 42.58 | 9.45x | 149.4 | 1412.1 | 0.17 | 1.65 |
| FP8 blockscale | 7168 | 8192 | 1024 | 781.35 | 53.62 | 14.57x | 153.9 | 2242.6 | 0.11 | 1.53 |
| FP8 blockscale | 7168 | 8192 | 2048 | 1529.90 | 105.58 | 14.49x | 157.2 | 2278.2 | 0.07 | 1.00 |
| FP8 blockscale | 7168 | 8192 | 4096 | 3020.94 | 206.66 | 14.62x | 159.2 | 2327.6 | 0.05 | 0.74 |
| FP8 blockscale | 7168 | 8192 | 8192 | 6010.17 | 355.85 | 16.89x | 160.1 | 2703.6 | 0.04 | 0.69 |
| FP8 blockscale | 12288 | 1536 | 1 | 9.58 | 5.07 | 1.89x | 3.9 | 7.4 | 1.97 | 3.73 |
| FP8 blockscale | 12288 | 1536 | 4 | 9.70 | 6.10 | 1.59x | 15.6 | 24.8 | 1.96 | 3.11 |
| FP8 blockscale | 12288 | 1536 | 8 | 9.74 | 6.54 | 1.49x | 31.0 | 46.1 | 1.96 | 2.92 |
| FP8 blockscale | 12288 | 1536 | 16 | 9.87 | 7.00 | 1.41x | 61.2 | 86.2 | 1.96 | 2.76 |
| FP8 blockscale | 12288 | 1536 | 32 | 14.13 | 8.40 | 1.68x | 85.5 | 143.8 | 1.40 | 2.35 |
| FP8 blockscale | 12288 | 1536 | 64 | 21.76 | 8.12 | 2.68x | 111.0 | 297.4 | 0.94 | 2.53 |
| FP8 blockscale | 12288 | 1536 | 128 | 39.16 | 8.69 | 4.51x | 123.4 | 555.8 | 0.57 | 2.56 |
| FP8 blockscale | 12288 | 1536 | 256 | 73.87 | 9.90 | 7.46x | 130.8 | 975.7 | 0.35 | 2.58 |
| FP8 blockscale | 12288 | 1536 | 512 | 142.76 | 11.99 | 11.90x | 135.4 | 1611.4 | 0.23 | 2.69 |
| FP8 blockscale | 12288 | 1536 | 1024 | 278.74 | 21.99 | 12.68x | 138.7 | 1757.8 | 0.16 | 2.08 |
| FP8 blockscale | 12288 | 1536 | 2048 | 553.47 | 41.30 | 13.40x | 139.7 | 1871.8 | 0.13 | 1.75 |
| FP8 blockscale | 12288 | 1536 | 4096 | 1101.77 | 70.23 | 15.69x | 140.3 | 2201.6 | 0.11 | 1.79 |
| FP8 blockscale | 12288 | 1536 | 8192 | 2193.42 | 130.94 | 16.75x | 141.0 | 2361.7 | 0.11 | 1.78 |
| FP8 blockscale | 16384 | 512 | 1 | 4.12 | 2.90 | 1.42x | 4.1 | 5.8 | 2.04 | 2.90 |
| FP8 blockscale | 16384 | 512 | 4 | 4.36 | 3.45 | 1.26x | 15.4 | 19.5 | 1.96 | 2.47 |
| FP8 blockscale | 16384 | 512 | 8 | 4.52 | 3.01 | 1.50x | 29.7 | 44.6 | 1.92 | 2.88 |
| FP8 blockscale | 16384 | 512 | 16 | 4.70 | 3.05 | 1.54x | 57.2 | 87.9 | 1.90 | 2.92 |
| FP8 blockscale | 16384 | 512 | 32 | 6.79 | 3.15 | 2.15x | 79.1 | 170.2 | 1.39 | 3.00 |
| FP8 blockscale | 16384 | 512 | 64 | 12.43 | 3.48 | 3.57x | 86.4 | 308.7 | 0.85 | 3.03 |
| FP8 blockscale | 16384 | 512 | 128 | 23.47 | 3.83 | 6.13x | 91.5 | 561.1 | 0.54 | 3.31 |
| FP8 blockscale | 16384 | 512 | 256 | 45.60 | 4.52 | 10.09x | 94.2 | 950.2 | 0.37 | 3.74 |
| FP8 blockscale | 16384 | 512 | 512 | 89.21 | 6.08 | 14.67x | 96.3 | 1412.1 | 0.29 | 4.18 |
| FP8 blockscale | 16384 | 512 | 1024 | 177.04 | 10.37 | 17.07x | 97.0 | 1656.5 | 0.24 | 4.10 |
| FP8 blockscale | 16384 | 512 | 2048 | 351.61 | 18.41 | 19.10x | 97.7 | 1866.8 | 0.22 | 4.16 |
| FP8 blockscale | 16384 | 512 | 4096 | 701.08 | 34.23 | 20.48x | 98.0 | 2007.7 | 0.21 | 4.23 |
| FP8 blockscale | 16384 | 512 | 8192 | 1401.05 | 66.13 | 21.18x | 98.1 | 2078.2 | 0.20 | 4.25 |
| FP8 blockscale preshuffle | 7168 | 8192 | 1 | 53.50 | 7.71 | 6.94x | 2.2 | 15.2 | 1.10 | 7.62 |
| FP8 blockscale preshuffle | 7168 | 8192 | 4 | 53.75 | 8.53 | 6.30x | 8.7 | 55.1 | 1.09 | 6.90 |
| FP8 blockscale preshuffle | 7168 | 8192 | 8 | 53.58 | 9.24 | 5.80x | 17.5 | 101.7 | 1.10 | 6.38 |
| FP8 blockscale preshuffle | 7168 | 8192 | 16 | 53.50 | 9.60 | 5.57x | 35.1 | 195.7 | 1.10 | 6.16 |
| FP8 blockscale preshuffle | 7168 | 8192 | 32 | 54.21 | 10.77 | 5.03x | 69.3 | 349.0 | 1.10 | 5.52 |
| FP8 blockscale preshuffle | 7168 | 8192 | 64 | 54.35 | 13.82 | 3.93x | 138.3 | 543.8 | 1.11 | 4.35 |
| FP8 blockscale preshuffle | 7168 | 8192 | 128 | 78.38 | 19.37 | 4.05x | 191.8 | 776.0 | 0.79 | 3.18 |
| FP8 blockscale preshuffle | 7168 | 8192 | 256 | 138.88 | 22.33 | 6.22x | 216.5 | 1346.3 | 0.46 | 2.89 |
| FP8 blockscale preshuffle | 7168 | 8192 | 512 | 239.09 | 33.94 | 7.04x | 251.5 | 1771.5 | 0.29 | 2.07 |
| FP8 blockscale preshuffle | 7168 | 8192 | 1024 | 452.34 | 45.41 | 9.96x | 265.9 | 2648.2 | 0.18 | 1.81 |
| FP8 blockscale preshuffle | 7168 | 8192 | 2048 | 868.30 | 87.21 | 9.96x | 277.0 | 2758.0 | 0.12 | 1.21 |
| FP8 blockscale preshuffle | 7168 | 8192 | 4096 | 1704.79 | 166.05 | 10.27x | 282.2 | 2897.0 | 0.09 | 0.92 |
| FP8 blockscale preshuffle | 7168 | 8192 | 8192 | 3379.15 | 292.03 | 11.57x | 284.7 | 3294.5 | 0.07 | 0.84 |
| FP8 blockscale preshuffle | 12288 | 1536 | 1 | 11.92 | 4.89 | 2.44x | 3.2 | 7.7 | 1.59 | 3.86 |
| FP8 blockscale preshuffle | 12288 | 1536 | 4 | 12.02 | 5.63 | 2.13x | 12.6 | 26.8 | 1.58 | 3.37 |
| FP8 blockscale preshuffle | 12288 | 1536 | 8 | 12.06 | 6.53 | 1.85x | 25.0 | 46.3 | 1.58 | 2.93 |
| FP8 blockscale preshuffle | 12288 | 1536 | 16 | 12.08 | 6.08 | 1.99x | 50.0 | 99.4 | 1.60 | 3.17 |
| FP8 blockscale preshuffle | 12288 | 1536 | 32 | 12.22 | 6.39 | 1.91x | 98.9 | 188.9 | 1.61 | 3.08 |
| FP8 blockscale preshuffle | 12288 | 1536 | 64 | 16.91 | 7.28 | 2.32x | 142.9 | 331.9 | 1.22 | 2.82 |
| FP8 blockscale preshuffle | 12288 | 1536 | 128 | 24.75 | 7.58 | 3.27x | 195.2 | 637.8 | 0.90 | 2.93 |
| FP8 blockscale preshuffle | 12288 | 1536 | 256 | 44.53 | 9.21 | 4.84x | 217.0 | 1049.5 | 0.57 | 2.78 |
| FP8 blockscale preshuffle | 12288 | 1536 | 512 | 81.39 | 11.75 | 6.93x | 237.5 | 1645.3 | 0.40 | 2.75 |
| FP8 blockscale preshuffle | 12288 | 1536 | 1024 | 154.58 | 20.04 | 7.71x | 250.1 | 1929.2 | 0.30 | 2.28 |
| FP8 blockscale preshuffle | 12288 | 1536 | 2048 | 304.62 | 34.47 | 8.84x | 253.8 | 2242.8 | 0.24 | 2.10 |
| FP8 blockscale preshuffle | 12288 | 1536 | 4096 | 603.25 | 65.45 | 9.22x | 256.3 | 2362.3 | 0.21 | 1.93 |
| FP8 blockscale preshuffle | 12288 | 1536 | 8192 | 1195.41 | 120.72 | 9.90x | 258.7 | 2561.5 | 0.20 | 1.93 |
| FP8 blockscale preshuffle | 16384 | 512 | 1 | 4.98 | 3.14 | 1.59x | 3.4 | 5.3 | 1.69 | 2.68 |
| FP8 blockscale preshuffle | 16384 | 512 | 4 | 5.19 | 3.58 | 1.45x | 12.9 | 18.8 | 1.64 | 2.38 |
| FP8 blockscale preshuffle | 16384 | 512 | 8 | 5.21 | 3.76 | 1.38x | 25.8 | 35.7 | 1.66 | 2.30 |
| FP8 blockscale preshuffle | 16384 | 512 | 16 | 5.36 | 3.88 | 1.38x | 50.1 | 69.3 | 1.67 | 2.30 |
| FP8 blockscale preshuffle | 16384 | 512 | 32 | 5.66 | 4.01 | 1.41x | 94.9 | 134.0 | 1.67 | 2.36 |
| FP8 blockscale preshuffle | 16384 | 512 | 64 | 7.77 | 4.40 | 1.77x | 138.2 | 244.3 | 1.35 | 2.39 |
| FP8 blockscale preshuffle | 16384 | 512 | 128 | 13.53 | 4.50 | 3.01x | 158.7 | 477.2 | 0.93 | 2.81 |
| FP8 blockscale preshuffle | 16384 | 512 | 256 | 25.01 | 4.92 | 5.09x | 171.7 | 873.8 | 0.68 | 3.44 |
| FP8 blockscale preshuffle | 16384 | 512 | 512 | 48.43 | 6.31 | 7.68x | 177.4 | 1362.2 | 0.53 | 4.03 |
| FP8 blockscale preshuffle | 16384 | 512 | 1024 | 95.78 | 10.41 | 9.20x | 179.4 | 1650.0 | 0.44 | 4.08 |
| FP8 blockscale preshuffle | 16384 | 512 | 2048 | 187.27 | 18.04 | 10.38x | 183.5 | 1905.2 | 0.41 | 4.25 |
| FP8 blockscale preshuffle | 16384 | 512 | 4096 | 372.80 | 33.41 | 11.16x | 184.3 | 2056.7 | 0.39 | 4.33 |
| FP8 blockscale preshuffle | 16384 | 512 | 8192 | 737.56 | 65.08 | 11.33x | 186.3 | 2111.8 | 0.38 | 4.32 |
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🟡 Changes recommended
Two preshuffled FP8 buckets exceed the compute-bound pipeline’s per-split tile count and permit out-of-bounds scale reads.
2 open issues
What changed in this PR
This PR adds gfx1250 Gluon tuning configs for Kimi-K2 Thinking shapes in existing GEMM kernels.
Changes:
- Adds nine shape-specific configs for MXFP4 preshuffle and FP8 blockscale variants.
- Tunes tile sizes, pipeline depth, and launch settings across M buckets.
- Includes fallback entries for larger M values.
| File | Description |
|---|---|
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_afp4wfp4_preshuffled/GEMM-AFP4WFP4_PRESHUFFLED-N=7168-K=8192.json |
MXFP4 tuning for N=7168, K=8192. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_afp4wfp4_preshuffled/GEMM-AFP4WFP4_PRESHUFFLED-N=16384-K=512.json |
MXFP4 tuning for N=16384, K=512. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_afp4wfp4_preshuffled/GEMM-AFP4WFP4_PRESHUFFLED-N=12288-K=1536.json |
MXFP4 tuning for N=12288, K=1536. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a8w8_blockscale/GEMM-A8W8_BLOCKSCALE-N=7168-K=8192.json |
FP8 blockscale tuning for N=7168, K=8192. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a8w8_blockscale/GEMM-A8W8_BLOCKSCALE-N=16384-K=512.json |
FP8 blockscale tuning for N=16384, K=512. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a8w8_blockscale/GEMM-A8W8_BLOCKSCALE-N=12288-K=1536.json |
FP8 blockscale tuning for N=12288, K=1536. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a8w8_blockscale_preshuffled/GEMM-A8W8_BLOCKSCALE_PRESHUFFLED-N=7168-K=8192.json |
Preshuffled FP8 tuning for N=7168, K=8192. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a8w8_blockscale_preshuffled/GEMM-A8W8_BLOCKSCALE_PRESHUFFLED-N=16384-K=512.json |
Preshuffled FP8 tuning for N=16384, K=512. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a8w8_blockscale_preshuffled/GEMM-A8W8_BLOCKSCALE_PRESHUFFLED-N=12288-K=1536.json |
Preshuffled FP8 tuning for N=12288, K=1536. |
Review effort: Balanced

