[TRTLLM-13248][feat] Wave 3: migrate MoE staged hooks - #15386
Conversation
|
/bot run |
|
PR_Github #54355 [ run ] triggered by Bot. Commit: |
|
PR_Github #54355 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "L0_Test-x86_64-Single-GPU, L0_Test-SBSA-Single-GPU" |
|
PR_Github #54368 [ run ] triggered by Bot. Commit: |
|
PR_Github #54368 [ run ] completed with state
|
|
/bot run |
|
PR_Github #54372 [ run ] triggered by Bot. Commit: |
|
PR_Github #54372 [ run ] completed with state
|
e378d6d to
32646d9
Compare
|
/bot run --disable-fail-fast |
|
/bot run --disable-fail-fast |
|
PR_Github #54488 [ run ] triggered by Bot. Commit: |
|
PR_Github #54488 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "A100X-PyTorch-1,DGX_B200-PyTorch-2,H100_PCIe-AutoDeploy-1,DGX_B200-8_GPUs-PyTorch-1,DGX_H100-2_GPUs-PyTorch-Others-2" |
|
PR_Github #54633 [ run ] triggered by Bot. Commit: |
|
PR_Github #54633 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #54669 [ run ] triggered by Bot. Commit: |
|
PR_Github #54669 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #57215 [ run ] triggered by Bot. Commit: |
|
PR_Github #57211 [ run ] completed with state |
|
PR_Github #57215 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #57267 [ run ] triggered by Bot. Commit: |
|
PR_Github #57267 [ run ] completed with state |
|
/bot run --disable-fail-fast |
3 similar comments
|
/bot run --disable-fail-fast |
|
/bot run --disable-fail-fast |
|
/bot run --disable-fail-fast |
|
PR_Github #57275 [ run ] triggered by Bot. Commit: |
|
PR_Github #57275 [ run ] completed with state
|
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
9a30e43 to
7963f1a
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #57571 [ run ] triggered by Bot. Commit: |
|
PR_Github #57571 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #57683 [ run ] triggered by Bot. Commit: |
|
PR_Github #57683 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #57801 [ run ] triggered by Bot. Commit: |
|
PR_Github #57801 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #57809 [ run ] triggered by Bot. Commit: |
|
PR_Github #57809 [ run ] completed with state |
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Summary
Wave 3 of the staged post-load hooks rollout, built on merged Wave 2 / #15288 and rebased onto
main.This migrates the remaining MoE, Mamba, min-latency, and sparse attention post-load work into the staged hook protocol. Tensor-layout and irreversible MoE weight work now lives in
transform_weights()behind_weights_transformed, while repeatable Python-side state refresh lives incache_derived_state(). Existing full-load paths continue to usepost_load_weights()as the backward-compatible shim.What Changed
MoEandConfigurableMoE, withtransform_weights()guarded by_weights_transformedandcache_derived_state()delegated to the quant method/backend.transform_weights(), while quant scales and load-balancer assignment refresh run incache_derived_state().cache_derived_state()while keepingpost_load_weights()compatibility shims.Dependency / prerequisite stack
This PR is Wave 3 in the staged post-load hooks rollout. The foundation PRs and Waves 1-2 (#14770, #14878, #15014, and #15288) are merged. The remaining wave PRs should merge in sequence; after each upstream wave lands, rebase the next wave onto
mainso review and CI focus on that wave's delta.Arrows point from prerequisite to dependent. PR numbers in graph nodes are clickable.
graph TD PR14770["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/14770'>#14770</a>: staged-hook contract (merged)"] PR14878["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/14878'>#14878</a>: GMS SourceIdentity gate (merged)"] PR15014["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/15014'>#15014</a>: Wave 1 aliases + GMS RO load (merged)"] PR15288["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/15288'>#15288</a>: Wave 2 Linear/Attention transforms (merged)"] PR15386["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/15386'>#15386</a>: Wave 3 MoE/Mamba staged hooks (this PR, ready for review)"] PR15387["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/15387'>#15387</a>: Wave 4 MX receiver cutover (open, ready for review)"] PR15432["<a href='https://github.com/NVIDIA/TensorRT-LLM/pull/15432'>#15432</a>: Wave 5 MX publisher + Llama receiver (open, ready for review)"] VERIFY["post-migration verification / demo (planned)"] PR14770 -->|satisfied| PR15014 PR14878 -->|satisfied| PR15014 PR15014 -->|satisfied| PR15288 PR15288 -->|satisfied| PR15386 PR15386 -->|blocking| PR15387 PR15387 -->|blocking| PR15432 PR15432 -.->|planned| VERIFY classDef merged fill:#dcfce7,stroke:#16a34a,color:#14532d; classDef inflight fill:#dbeafe,stroke:#2563eb,color:#1e3a8a; classDef current fill:#ede9fe,stroke:#7c3aed,color:#3b0764,stroke-width:3px; classDef downstream fill:#f3f4f6,stroke:#6b7280,color:#374151,stroke-dasharray:5 5; linkStyle 0,1,2,3 stroke:#16a34a,stroke-width:2px; linkStyle 4,5 stroke:#ea580c,stroke-width:3px; linkStyle 6 stroke:#6b7280,stroke-width:2px,stroke-dasharray:5 5; class PR14770,PR14878,PR15014,PR15288 merged; class PR15387,PR15432 inflight; class PR15386 current; class VERIFY downstream;Immediate merge dependency satisfied: #15288 merged on 2026-06-26, and this branch is rebased onto
mainso the PR diff is the Wave 3 delta.Test Plan
git diff --check origin/codex/staged-hooks-wave2-transform-weights..HEADpython -m py_compile tensorrt_llm/_torch/attention_backend/sparse/dsa.py tensorrt_llm/_torch/models/modeling_llama_min_latency.py tensorrt_llm/_torch/modules/fused_moe/configurable_moe.py tensorrt_llm/_torch/modules/fused_moe/fused_moe_cute_dsl_b12x.py tensorrt_llm/_torch/modules/fused_moe/fused_moe_cutlass.py tensorrt_llm/_torch/modules/fused_moe/fused_moe_densegemm.py tensorrt_llm/_torch/modules/fused_moe/fused_moe_triton.py tensorrt_llm/_torch/modules/fused_moe/fused_moe_trtllm_gen.py tensorrt_llm/_torch/modules/fused_moe/fused_moe_wide_ep.py tensorrt_llm/_torch/modules/fused_moe/interface.py tensorrt_llm/_torch/modules/fused_moe/mega_moe/mega_moe_deepgemm.py tensorrt_llm/_torch/modules/fused_moe/quantization.py tensorrt_llm/_torch/modules/mamba/mamba2_mixer.py tests/unittest/_torch/attention/sparse/test_dsa_indexer.py tests/unittest/_torch/modules/moe/test_moe_backend.py tests/unittest/_torch/modules/mamba/test_mamba2_mixer.pywaive list checkandvalidate-test-listswere skipped because the hook runtime fails inscripts/check_test_list.pyonstr | Nonebefore inspecting this diff.transformersis not installed and the localtorchpackage lacksnn/distributed.Next Steps
main; after [TRTLLM-13249][feat] Wave 4: add MX staged receiver cutover #15387 lands, repeat for [TRTLLM-13250][feat] Wave 5: Enable MX post-transform Llama receiver #15432.Summary by CodeRabbit
Refactor
Tests