Skip to content

Comments

[None][chore] enable EPLB for DEEPGEMM#10617

Merged
xxi-nv merged 1 commit intoNVIDIA:mainfrom
xxi-nv:enableEPLBForDEEPGEMM
Jan 14, 2026
Merged

[None][chore] enable EPLB for DEEPGEMM#10617
xxi-nv merged 1 commit intoNVIDIA:mainfrom
xxi-nv:enableEPLBForDEEPGEMM

Conversation

@xxi-nv
Copy link
Collaborator

@xxi-nv xxi-nv commented Jan 13, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved support for MoE load-balancing with expanded compatibility options.

✏️ Tip: You can customize this high-level summary in your review settings.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

Details

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@xxi-nv xxi-nv requested a review from a team as a code owner January 13, 2026 03:27
@xxi-nv xxi-nv requested a review from yuxianq January 13, 2026 03:27
@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 13, 2026

/bot run

@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 13, 2026

/bot run --disable-fail-fast

@xxi-nv xxi-nv requested review from QiJune and removed request for yuxianq January 13, 2026 03:28
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

The MoE load-balancer support was expanded to include DeepGemmFusedMoE in the allowed MoE class list. The assertion validating supported MoE classes and its corresponding error message were updated to reflect this new option.

Changes

Cohort / File(s) Summary
MoE Load-Balancer Validation Logic
tensorrt_llm/_torch/modules/fused_moe/create_moe.py
Added DeepGemmFusedMoE to the assertion set of allowed MoE classes when a MoE load balancer is present; updated error message to include this new option

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. It only contains the template structure without filling in critical sections like Description, Test Coverage, or PR Checklist items. Complete the PR description by filling in: (1) Description section explaining the issue and solution, (2) Test Coverage section listing relevant tests, (3) PR Checklist with appropriate items checked.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: enabling EPLB (Early Exit Pattern Load Balancing) for DEEPGEMM, which aligns with the code modification that expands MoE load-balancer support.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tensorrt_llm/_torch/modules/fused_moe/create_moe.py (1)

245-258: Missing init_load_balancer parameter for DeepGemmFusedMoE instantiation.

For EPLB to actually work with DeepGemmFusedMoE, the init_load_balancer parameter must be passed to the constructor. The relevant code snippet confirms DeepGemmFusedMoE.__init__ accepts init_load_balancer and without_comm flags. Compare to CutlassFusedMoE (line 197), TRTLLMGenFusedMoE (line 177), and CuteDslFusedMoE (line 242) which all pass these parameters.

🐛 Proposed fix
     elif moe_cls == DeepGemmFusedMoE:
         return moe_cls(
             routing_method=routing_method,
             num_experts=num_experts,
             hidden_size=hidden_size,
             intermediate_size=intermediate_size,
             dtype=dtype,
             reduce_results=reduce_results,
             model_config=model_config,
             aux_stream_dict=aux_stream_dict,
             weight_loading_mode=weight_loading_mode,
             apply_router_weight_on_input=apply_router_weight_on_input,
             layer_idx=layer_idx,
+            init_load_balancer=init_load_balancer,
+            without_comm=without_comm,
         )
🤖 Fix all issues with AI agents
In @tensorrt_llm/_torch/modules/fused_moe/create_moe.py:
- Around line 140-143: The assertion message is out of sync with the asserted
classes: update the error string in the assert inside create_moe.py so it
mentions DeepGemmFusedMoE as well; modify the message associated with the assert
that references WideEPMoE, CutlassFusedMoE, TRTLLMGenFusedMoE and
CuteDslFusedMoE to include DeepGemmFusedMoE (or reword to “...supported in
WideEPMoE, CutlassFusedMoE, TRTLLMGenFusedMoE, CuteDslFusedMoE and
DeepGemmFusedMoE.”) so the text matches the list used in the assertion.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ba1cb68 and 43432a7.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/modules/fused_moe/create_moe.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.py: The code developed for TensorRT-LLM should conform to Python 3.8+
Indent Python code with 4 spaces. Do not use tabs
Always maintain the namespace when importing Python modules, even if only one class or function from a module is used
Python filenames should use snake_case (e.g., some_file.py)
Python classes should use PascalCase (e.g., class SomeClass)
Python functions and methods should use snake_case (e.g., def my_awesome_function():)
Python local variables should use snake_case, with prefix k for variable names that start with a number (e.g., k_99th_percentile)
Python global variables should use upper snake_case with prefix G (e.g., G_MY_GLOBAL)
Python constants should use upper snake_case (e.g., MY_CONSTANT)
Avoid shadowing variables declared in an outer scope in Python
Initialize all externally visible members of a Python class in the constructor
For Python interfaces that may be used outside a file, prefer docstrings over comments
Use comments in Python for code within a function, or interfaces that are local to a file
Use Google-style docstrings for Python classes and functions, which can be parsed by Sphinx
Python attributes and variables can be documented inline with the format """<type>: Description"""
Avoid using reflection in Python when functionality can be easily achieved without reflection
When using try-except blocks in Python, limit the except clause to the smallest set of errors possible
When using try-except blocks in Python to handle multiple possible variable types (duck-typing), keep the body of the try as small as possible and use the else block for the main logic

Files:

  • tensorrt_llm/_torch/modules/fused_moe/create_moe.py
**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification

Files:

  • tensorrt_llm/_torch/modules/fused_moe/create_moe.py
🧠 Learnings (4)
📓 Common learnings
Learnt from: sklevtsov-nvidia
Repo: NVIDIA/TensorRT-LLM PR: 3294
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:1198-1209
Timestamp: 2025-08-08T22:03:40.707Z
Learning: In the CUTLASS MoE kernels (cpp/tensorrt_llm/cutlass_extensions), when `layout_info.fusion` is set to `TmaWarpSpecializedGroupedGemmInput::EpilogueFusion::FINALIZE`, the `router_scales` parameter must be non-null by design. The fused finalize kernel epilogue does not perform nullptr checks and requires valid router scales to function correctly. This is an implicit contract that callers must satisfy when enabling the FINALIZE fusion mode.
Learnt from: djns99
Repo: NVIDIA/TensorRT-LLM PR: 6915
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:4010-4012
Timestamp: 2025-08-14T23:23:27.449Z
Learning: For MOE (Mixture of Experts) code reviews in TensorRT-LLM, avoid repeatedly suggesting finalize fusion validation checks and safety assertions. The user djns99 has indicated these suggestions are repetitive and unwanted across multiple MOE-related changes.
📚 Learning: 2025-08-14T23:23:27.449Z
Learnt from: djns99
Repo: NVIDIA/TensorRT-LLM PR: 6915
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:4010-4012
Timestamp: 2025-08-14T23:23:27.449Z
Learning: For MOE (Mixture of Experts) code reviews in TensorRT-LLM, avoid repeatedly suggesting finalize fusion validation checks and safety assertions. The user djns99 has indicated these suggestions are repetitive and unwanted across multiple MOE-related changes.

Applied to files:

  • tensorrt_llm/_torch/modules/fused_moe/create_moe.py
📚 Learning: 2025-08-21T02:39:12.009Z
Learnt from: djns99
Repo: NVIDIA/TensorRT-LLM PR: 7104
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:1475-1480
Timestamp: 2025-08-21T02:39:12.009Z
Learning: The min latency mode functionality in TensorRT-LLM MOE kernels (cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu) is deprecated and no longer being maintained/updated, as confirmed by djns99. Bug reports and optimization suggestions for the computeStridesTmaWarpSpecializedLowLatencyKernel and related min latency code paths should be deprioritized.

Applied to files:

  • tensorrt_llm/_torch/modules/fused_moe/create_moe.py
📚 Learning: 2025-08-09T20:57:04.084Z
Learnt from: sklevtsov-nvidia
Repo: NVIDIA/TensorRT-LLM PR: 3294
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_tma_warp_specialized_input.cu:118-127
Timestamp: 2025-08-09T20:57:04.084Z
Learning: In the CUTLASS MoE finalize fusion implementation (cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_tma_warp_specialized_input.cu), when setting `fused_finalize_epilogue.stride_final_output` with shape `(hidden_size, num_output_tokens, 1)`, the `num_rows_in_final_output` should be set to `num_output_tokens` (not `hidden_size`) because of a swap+transpose operation that maps rows of the output tensor to `hidden_size` and columns to `num_output_tokens`.

Applied to files:

  • tensorrt_llm/_torch/modules/fused_moe/create_moe.py
🧬 Code graph analysis (1)
tensorrt_llm/_torch/modules/fused_moe/create_moe.py (1)
tensorrt_llm/_torch/modules/fused_moe/fused_moe_deepgemm.py (1)
  • DeepGemmFusedMoE (350-880)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check

Copy link
Collaborator

@QiJune QiJune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31675 [ run ] triggered by Bot. Commit: 43432a7

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31676 [ run ] triggered by Bot. Commit: 43432a7

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31675 [ run ] completed with state ABORTED. Commit: 43432a7

@xxi-nv xxi-nv force-pushed the enableEPLBForDEEPGEMM branch from 43432a7 to a707201 Compare January 13, 2026 04:00
@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 13, 2026

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31683 [ run ] triggered by Bot. Commit: a707201

@xxi-nv xxi-nv changed the base branch from main to release/1.2.0rc6.post1 January 13, 2026 04:19
@xxi-nv xxi-nv requested review from a team as code owners January 13, 2026 04:19
@xxi-nv xxi-nv changed the base branch from release/1.2.0rc6.post1 to main January 13, 2026 04:19
@xxi-nv xxi-nv removed request for a team January 13, 2026 04:23
Signed-off-by: xxi <xxi@nvidia.com>
@xxi-nv xxi-nv force-pushed the enableEPLBForDEEPGEMM branch from a707201 to 8d998af Compare January 13, 2026 04:31
@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 13, 2026

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31686 [ run ] triggered by Bot. Commit: 8d998af

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31686 [ run ] completed with state SUCCESS. Commit: 8d998af
/LLM/main/L0_MergeRequest_PR pipeline #24512 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 13, 2026

/bot run --disable-fail-fast

@xxi-nv xxi-nv enabled auto-merge (squash) January 13, 2026 23:27
@tensorrt-cicd
Copy link
Collaborator

PR_Github #31832 [ run ] triggered by Bot. Commit: 8d998af

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31832 [ run ] completed with state SUCCESS. Commit: 8d998af
/LLM/main/L0_MergeRequest_PR pipeline #24644 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 14, 2026

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31863 [ run ] triggered by Bot. Commit: 8d998af

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31863 [ run ] completed with state SUCCESS. Commit: 8d998af
/LLM/main/L0_MergeRequest_PR pipeline #24674 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 14, 2026

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31900 [ run ] triggered by Bot. Commit: 8d998af

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31900 [ run ] completed with state SUCCESS. Commit: 8d998af
/LLM/main/L0_MergeRequest_PR pipeline #24703 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

@xxi-nv
Copy link
Collaborator Author

xxi-nv commented Jan 14, 2026

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31928 [ run ] triggered by Bot. Commit: 8d998af

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31928 [ run ] completed with state SUCCESS. Commit: 8d998af
/LLM/main/L0_MergeRequest_PR pipeline #24729 completed with status: 'SUCCESS'

@xxi-nv xxi-nv merged commit d886250 into NVIDIA:main Jan 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants