Repository navigation
Commit 7da5a65
committed
[None][perf] MegaMoE: run the SM107 gen-phase defaults on the decode scheduler
The re-synced Rubin gen-phase kernel accepts only ("decode", lead) schedules and refuses
grouped / phase_interleave at construction, which the backend turns into a silent fallback
to the generic kernel. Move the gen-phase table to decode tactics picked on VR200 at EP4
(DSv4-Pro and Kimi K3, balanced and power-law routing), drop the Kimi K3 512 entry that the
generic table now matches, and log a rejected default tactic as a warning. The 384 bucket
uses N128 with an FC1 lead of 91, 1.1-2.2% faster than N256 / lead 45 on this kernel.
GLM 5.2's high-throughput target builds its own gen-phase kernel, which has no decode
scheduler. Give the shared runner an overridable _default_tactic(); the GLM runner keeps
the phase_interleave tactics the shared table used before (32-192 tokens/rank) and refuses
a decode tactic.
The custom op allocates the generic kernels' tmp buffer as the 128-byte-aligned tail of the
cached local workspace and declares the output activation 32-byte aligned for the top-k
reduce.
Tests check that every gen-phase default is a decode tactic, builds the gen-phase kernel for
DSv4-Pro and Kimi K3, and that the GLM runner keeps its phase_interleave tactics.
Signed-off-by: Barry Kang <43644113+Barry-Delaney@users.noreply.github.com>1 parent 97bb881 commit 7da5a65
3 files changed
Lines changed: 240 additions & 133 deletions
File tree
- tensorrt_llm/_torch
- modeling_v2/models/glm_moe_dsa/glm_5_2_nvfp4__sm_107__high_throughput/ops/moe
- moe/custom_ops
- tests/unittest/_torch/moe
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
23 | 76 | | |
24 | 77 | | |
25 | 78 | | |
| |||
114 | 167 | | |
115 | 168 | | |
116 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
117 | 177 | | |
118 | 178 | | |
| 179 | + | |
| 180 | + | |
119 | 181 | | |
120 | 182 | | |
121 | 183 | | |
| |||
214 | 276 | | |
215 | 277 | | |
216 | 278 | | |
217 | | - | |
218 | | - | |
219 | | - | |
| 279 | + | |
220 | 280 | | |
221 | 281 | | |
222 | 282 | | |
223 | 283 | | |
224 | 284 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 285 | + | |
228 | 286 | | |
229 | 287 | | |
230 | 288 | | |
| |||
0 commit comments