Skip to content

[https://nvbugs/6442074][fix] Rename MTPEagleDynamicTreeWorker.forward to _forward_impl#16724

Merged
chzblych merged 1 commit into
NVIDIA:mainfrom
sunnyqgg:fix_mtp_dynamic_tree_forward_impl
Jul 22, 2026
Merged

[https://nvbugs/6442074][fix] Rename MTPEagleDynamicTreeWorker.forward to _forward_impl#16724
chzblych merged 1 commit into
NVIDIA:mainfrom
sunnyqgg:fix_mtp_dynamic_tree_forward_impl

Conversation

@sunnyqgg

@sunnyqgg sunnyqgg commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Changes

  • tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py: rename the forward override to _forward_impl per the guard's contract (1 line). SpecWorkerBase.forward now wraps it with the guaranteed spec-dec attn-metadata cleanup, same as Eagle3OneModelDynamicTreeWorker.

Test plan

  • Reproduced the failure on main tip: python -c "import tensorrt_llm._torch.speculative.utils" raises the guard TypeError
  • Verified the same import passes the class-definition guard with this fix (A/B on the same tree)

Dev Engineer Review

  • Renamed MTPEagleDynamicTreeWorker.forward to _forward_impl, satisfying the SpecWorkerBase.__init_subclass__ guard.
  • Preserved the method body, parameters, and NVTX label (mtp_dyn.forward).
  • SpecWorkerBase.forward remains the public entry point, preserving speculative-decoding attention-metadata cleanup.
  • No configuration or test-list changes.

QA Engineer Review

No test changes.

…d to _forward_impl

Signed-off-by: qgai <qgai@nvidia.com>
@sunnyqgg
sunnyqgg requested a review from a team as a code owner July 22, 2026 10:05
@sunnyqgg

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@coderabbitai

coderabbitai Bot commented Jul 22, 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: 6799847d-da73-4c1f-a9b6-7df36d9ec35d

📥 Commits

Reviewing files that changed from the base of the PR and between 9cd6a49 and 132f121.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py

Walkthrough

MTPEagleDynamicTreeWorker.forward(...) is renamed to _forward_impl(...) in the MTP dynamic tree worker. The NVTX label and method body remain unchanged.

Changes

MTP dynamic tree worker

Layer / File(s) Summary
Rename worker entry method
tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py
Renames the method declaration from forward to _forward_impl while preserving its decorator and implementation.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: asfiyab-nvidia

🚥 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 rename.
Description check ✅ Passed The description includes Summary, Changes, and Test plan sections and is mostly complete.
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 #60962 [ run ] triggered by Bot. Commit: 132f121 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60962 [ run ] completed with state FAILURE. Commit: 132f121
/LLM/main/L0_MergeRequest_PR pipeline #49224 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

@Hudayday

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60978 [ run ] triggered by Bot. Commit: 132f121 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60978 [ run ] completed with state SUCCESS. Commit: 132f121
/LLM/main/L0_MergeRequest_PR pipeline #49240 completed with status: 'SUCCESS'

CI Report

Link to invocation

@chzblych
chzblych merged commit 1fbd240 into NVIDIA:main Jul 22, 2026
12 checks passed
yuanjingx87 pushed a commit to yuanjingx87/TensorRT-LLM that referenced this pull request Jul 26, 2026
…d to _forward_impl (NVIDIA#16724)

Signed-off-by: qgai <qgai@nvidia.com>
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