[None][feat] Add kimi_k2/glm_5 grouped routing and fused router to bench_moe - #16830
Conversation
876efbc to
d738c12
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThe MoE microbenchmark adds a ChangesMoE benchmark updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d738c12 to
201960c
Compare
…nch_moe - specs.py: set kimi_k2 n_group=1/topk_group=1 (real Kimi-K2 uses a single expert group; avoids the TRTLLM routing kernel topk_group<=4 failure); add glm_5 model spec (256 experts, top-8, DeepSeek-V3-style single-group routing). - mapping.py: use fused DeepSeek-V3 routing (is_fused=True). - search.py: prune MEGAMOE_DEEPGEMM + TEP as skipped instead of a hard build failure (kernel assumes partitioned MoE input; TEP replicates TP-wide). Signed-off-by: kikig <29116997+guqiqi@users.noreply.github.com>
201960c to
f73f203
Compare
|
/bot run |
|
PR_Github #61523 [ run ] triggered by Bot. Commit: |
|
PR_Github #61523 [ run ] completed with state |
…nnahz/dep-1083-port-flashinfer-stable-va-lifecycle-for-native-all-reduce * 'main' of https://github.com/NVIDIA/TensorRT-LLM: (54 commits) [NVIDIA#15673][fix] Enable CUDA core fast path for SM89/SM120/SM121 (NVIDIA#12705) [None][test] Adjust timeout cases in QA perf test (NVIDIA#16894) [https://nvbugs/6157892][fix] Mistral format refactor (NVIDIA#15123) [None][feat] Add kimi_k2/glm_5 grouped routing and fused router to bench_moe (NVIDIA#16830) [https://nvbugs/6501376][fix] Test-only fix — drop the `if hidden_size % 2 != 0: with pytest.raises(...)`… (NVIDIA#16844) [TRTLLM-13642][feat] Add perf sanity tests for Llama-3.1-8B and Gemma-3-1B and verify cache transceiver V2 support (NVIDIA#16355) [https://nvbugs/6433376][fix] Update the Dense test to mirror the MoE sibling — assert `bfloat16` under… (NVIDIA#16203) [None][fix] Resolve NVFP4 mixed-precision base layers for the DSpark draft (NVIDIA#16831) [https://nvbugs/6479324][test] Remove waiver for fixed qwen3_5_4b_fp8_stress disaggregated stress test (NVIDIA#16878) [https://nvbugs/6507109][infra] Split slow DGX B300 attention unit tests (NVIDIA#16838) [None][infra] Waive 21 failed cases for main in post-merge 2862 (NVIDIA#16882) [None][perf] prepare_inputs: avoid O(seq_len) get_tokens(0) marshalling on the host (NVIDIA#16791) [None][perf] Optimize Blackwell fused MHC half-MMA kernel (NVIDIA#16799) [None][infra] Auto-update test durations from OpenSearch (last 7 days) [None][perf] Skip DeepGEMM clean_logits in DSA indexer prefill on custom top-k path (NVIDIA#16789) [None][feat] Support DeepSeek-V4 in layer_wise_benchmarks (NVIDIA#16774) [https://nvbugs/6465993][fix] use attention cache dtype for disaggregated transfer (NVIDIA#16505) [https://nvbugs/6463822][fix] Fix LTX2 CUDA graph test leak issue (NVIDIA#16775) [https://nvbugs/5948435][chore] Unwaive DeepSeekV3Lite test_nvfp4_4gpus CUTLASS ep4 fp8kv on RTXPro6000D (NVIDIA#16621) [TRTLLM-14417][fix] Exclude ADP/cuda-graph dummy requests from speculative-decode acceptance stats (NVIDIA#16571) ... Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
…nnahz/dep-1082-shared-mnnvl-moe-lifecycle * 'main' of https://github.com/NVIDIA/TensorRT-LLM: (142 commits) [NVIDIA#15673][fix] Enable CUDA core fast path for SM89/SM120/SM121 (NVIDIA#12705) [None][test] Adjust timeout cases in QA perf test (NVIDIA#16894) [https://nvbugs/6157892][fix] Mistral format refactor (NVIDIA#15123) [None][feat] Add kimi_k2/glm_5 grouped routing and fused router to bench_moe (NVIDIA#16830) [https://nvbugs/6501376][fix] Test-only fix — drop the `if hidden_size % 2 != 0: with pytest.raises(...)`… (NVIDIA#16844) [TRTLLM-13642][feat] Add perf sanity tests for Llama-3.1-8B and Gemma-3-1B and verify cache transceiver V2 support (NVIDIA#16355) [https://nvbugs/6433376][fix] Update the Dense test to mirror the MoE sibling — assert `bfloat16` under… (NVIDIA#16203) [None][fix] Resolve NVFP4 mixed-precision base layers for the DSpark draft (NVIDIA#16831) [https://nvbugs/6479324][test] Remove waiver for fixed qwen3_5_4b_fp8_stress disaggregated stress test (NVIDIA#16878) [https://nvbugs/6507109][infra] Split slow DGX B300 attention unit tests (NVIDIA#16838) [None][infra] Waive 21 failed cases for main in post-merge 2862 (NVIDIA#16882) [None][perf] prepare_inputs: avoid O(seq_len) get_tokens(0) marshalling on the host (NVIDIA#16791) [None][perf] Optimize Blackwell fused MHC half-MMA kernel (NVIDIA#16799) [None][infra] Auto-update test durations from OpenSearch (last 7 days) [None][perf] Skip DeepGEMM clean_logits in DSA indexer prefill on custom top-k path (NVIDIA#16789) [None][feat] Support DeepSeek-V4 in layer_wise_benchmarks (NVIDIA#16774) [https://nvbugs/6465993][fix] use attention cache dtype for disaggregated transfer (NVIDIA#16505) [https://nvbugs/6463822][fix] Fix LTX2 CUDA graph test leak issue (NVIDIA#16775) [https://nvbugs/5948435][chore] Unwaive DeepSeekV3Lite test_nvfp4_4gpus CUTLASS ep4 fp8kv on RTXPro6000D (NVIDIA#16621) [TRTLLM-14417][fix] Exclude ADP/cuda-graph dummy requests from speculative-decode acceptance stats (NVIDIA#16571) ... Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
Dev Engineer Review
tests/microbenchmarks/bench_moe/mapping.pyto constructDeepSeekV3MoeRoutingMethodwithis_fused=True, enabling the fused DeepSeek-V3 routing path for this benchmark configuration.tests/microbenchmarks/bench_moe/specs.pyupdateskimi_k2ton_group=1/topk_group=1and adds a newglm_5ModelSpecwithrouting_method="DEEPSEEK_V3",n_group=1/topk_group=1, andquant_algo=None.tests/microbenchmarks/bench_moe/search.pyrejectsMEGAMOE_DEEPGEMMwhenenable_dpis false (TEP) andworld_size > 1, recording the candidate as skipped instead of hard-failing during backend initialization.bench_moemicrobenchmark code/specs; no unrelated config/test-list changes were made.QA Engineer Review
tests/microbenchmarks/bench_moe/:mapping.py:_create_routing_method(DeepSeek-V3 routing construction now usesis_fused=True).search.py:is_candidate_valid(adds early prune forMEGAMOE_DEEPGEMM+ TEP whenenable_dpis false andworld_size > 1).specs.py:BUILT_IN_MODELSregistry (addsglm_5, updateskimi_k2routing grouping ton_group=1/topk_group=1).tests/integration/test_lists/(e.g.,test-db/,qa/,waives.txt) forbench_moe/microbenchmarks/bench_moe.Description
This PR adds
bench_moesupport for two additional MoE models and fixes a routingconfiguration issue for Kimi-K2:
specs.py: setkimi_k2n_group=1/topk_group=1. Real Kimi-K2 uses a singleexpert group; the previous multi-group value tripped the TRT-LLM routing kernel
assertion
topk_group <= 4and failed the build. Also adds aglm_5model spec(256 experts, top-8, DeepSeek-V3-style single-group routing).
mapping.py: use the fused DeepSeek-V3 routing path (is_fused=True) for these specs.search.py: mark theMEGAMOE_DEEPGEMM+ TEP combination as skipped rather than ahard build failure. That kernel assumes a partitioned MoE input, whereas TEP replicates
the tensor TP-wide, so the combination is not valid and should be pruned from the sweep.
The change is scoped entirely to the
bench_moebenchmarking utility and does not touchruntime/serving code paths.
Test Coverage
Validated by running the
bench_moesweep locally forkimi_k2andglm_5:the previously-failing Kimi-K2 routing build now succeeds,
glm_5is enumerated andbenchmarked, and
MEGAMOE_DEEPGEMM+TEP entries are reported as skipped instead of abortingthe sweep.
PR Checklist
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.