Skip to content

[TRTLLM-14609][chore] Remove legacy MoE path in CuteDslFusedMoE - #16863

Merged
xxi-nv merged 2 commits into
NVIDIA:mainfrom
xxi-nv:xxi/moe-rm-legacy-cutedsl
Jul 28, 2026
Merged

[TRTLLM-14609][chore] Remove legacy MoE path in CuteDslFusedMoE#16863
xxi-nv merged 2 commits into
NVIDIA:mainfrom
xxi-nv:xxi/moe-rm-legacy-cutedsl

Conversation

@xxi-nv

@xxi-nv xxi-nv commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Description

For the sake of MoE code health, this PR removes the legacy (pre-ConfigurableMoE) forward path from CuteDslFusedMoE.

ConfigurableMoE has been the default MoE path for months (ENABLE_CONFIGURABLE_MOE defaults to "1"), so the backend-internal forward pipeline and the legacy all-to-all method selection are no longer reachable in the default flow.

What is removed (tensorrt_llm/_torch/modules/fused_moe/fused_moe_cute_dsl.py)

  • select_alltoall_method_type()
  • forward_chunk()

Net effect: 43 deletions in a single file.

What is deliberately preserved

  • The live contract called by ConfigurableMoE / MoEScheduler is untouched: run_moe() and supports_moe_output_in_alltoall_workspace().

Test Coverage

Verified on OCI GB200 (1 node, 4 GPUs) with the container pinned by jenkins/current_image_tags.properties, running tests/unittest/_torch/modules/moe/test_moe_module.py filtered to this backend (excluding the MEGAMOE_CUTEDSL variant):

Scope Result
test_configurable_moe_single_gpu 9 passed
test_configurable_moe_multi_gpu 20 passed
test_configurable_moe_multi_gpu_eplb 2 passed

31 passed, 0 failed.

PR Checklist

  • PR title follows [JIRA/NVBUG][type] description
  • Commit is signed off (DCO)
  • Tests pass for the affected backend

Dev Engineer Review

  • Removed the legacy pre-ConfigurableMoE forward path from CuteDslFusedMoE, including select_alltoall_method_type() and forward_chunk().
  • Removed now-unused allgather and AlltoallMethodType imports.
  • The active ConfigurableMoE/MoEScheduler contract remains unchanged, including run_moe() and supports_moe_output_in_alltoall_workspace().
  • No config or test-list changes.
  • OCI GB200 validation passed all 31 affected-backend tests.

QA Engineer Review

  • No test changes.

ConfigurableMoE has been the default MoE path for months (ENABLE_CONFIGURABLE_MOE defaults to 1) and drives compute through backend.run_moe while the wrapper owns communication and chunk scheduling. The backend-level legacy MoE forward path is dead code on that path. Remove it; run_moe and the live ConfigurableMoE contract (quantize_input, get_workspaces, supports_moe_output_in_alltoall_workspace, forward_fake, etc.) are unchanged.

Signed-off-by: xxi <xxi@nvidia.com>
@xxi-nv

xxi-nv commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@xxi-nv
xxi-nv marked this pull request as ready for review July 26, 2026 23:58
@xxi-nv
xxi-nv requested a review from a team as a code owner July 26, 2026 23:58
@xxi-nv
xxi-nv requested review from leslie-fang25 and rosong11 July 26, 2026 23:58
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9a940c7a-3e13-446b-af6a-e38deb0ef20b

📥 Commits

Reviewing files that changed from the base of the PR and between 4b7d719 and 347661a.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/modules/fused_moe/fused_moe_cute_dsl.py
💤 Files with no reviewable changes (1)
  • tensorrt_llm/_torch/modules/fused_moe/fused_moe_cute_dsl.py

Walkthrough

The Cute DSL fused MoE module removes unused imports, the select_alltoall_method_type() override, and the legacy forward_chunk() implementation.

Changes

Cute DSL MoE cleanup

Layer / File(s) Summary
Remove obsolete Cute DSL paths
tensorrt_llm/_torch/modules/fused_moe/fused_moe_cute_dsl.py
Removes unused distributed and interface imports, the all-to-all method selection override, and the legacy routing and chunk-forwarding implementation.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required ticket/type format and clearly states the main change.
Description check ✅ Passed The description includes the required sections and provides a clear summary, tests, and checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61759 [ run ] triggered by Bot. Commit: 347661a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61759 [ run ] completed with state FAILURE. Commit: 347661a
/LLM/main/L0_MergeRequest_PR pipeline #49961 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@xxi-nv

xxi-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61821 [ run ] triggered by Bot. Commit: 347661a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61821 [ run ] completed with state SUCCESS. Commit: 347661a
/LLM/main/L0_MergeRequest_PR pipeline #50014 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@xxi-nv

xxi-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61876 [ run ] triggered by Bot. Commit: 347661a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61876 [ run ] completed with state SUCCESS. Commit: 347661a
/LLM/main/L0_MergeRequest_PR pipeline #50067 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@xxi-nv

xxi-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61896 [ run ] triggered by Bot. Commit: 347661a Link to invocation

@xxi-nv

xxi-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61906 [ run ] triggered by Bot. Commit: 7a8d83a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61896 [ run ] completed with state ABORTED. Commit: 347661a

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61906 [ run ] completed with state FAILURE. Commit: 7a8d83a
/LLM/main/L0_MergeRequest_PR pipeline #50097 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@xxi-nv

xxi-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61952 [ run ] triggered by Bot. Commit: 7a8d83a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61952 [ run ] completed with state FAILURE. Commit: 7a8d83a
/LLM/main/L0_MergeRequest_PR pipeline #50146 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@xxi-nv

xxi-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62005 [ run ] triggered by Bot. Commit: 7a8d83a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62005 [ run ] completed with state SUCCESS. Commit: 7a8d83a
/LLM/main/L0_MergeRequest_PR pipeline #50195 completed with status: 'SUCCESS'

CI Report

Link to invocation

@xxi-nv
xxi-nv merged commit ede2cad into NVIDIA:main Jul 28, 2026
7 checks passed
@xxi-nv
xxi-nv deleted the xxi/moe-rm-legacy-cutedsl branch July 28, 2026 05:12
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.

3 participants