Skip to content

[https://nvbugs/6478697][fix] Renamed mtp_dynamic_tree.py:639 forward_forward_impl (matching…#16727

Closed
chenfeiz0326 wants to merge 1 commit into
NVIDIA:mainfrom
chenfeiz0326:repair-bot-bug6478697
Closed

[https://nvbugs/6478697][fix] Renamed mtp_dynamic_tree.py:639 forward_forward_impl (matching…#16727
chenfeiz0326 wants to merge 1 commit into
NVIDIA:mainfrom
chenfeiz0326:repair-bot-bug6478697

Conversation

@chenfeiz0326

@chenfeiz0326 chenfeiz0326 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: MTPEagleDynamicTreeWorker (added by [None][feat] Support Nemotron dynamic-tree MTP decoding #15582) overrode SpecWorkerBase.forward, which the init_subclass guard (nvbugs/6442074) forbids, raising TypeError at import and breaking all pytest collection (0 items).
  • Fix: Renamed mtp_dynamic_tree.py:639 forward_forward_impl (matching MTPWorker), letting the base SpecWorkerBase.forward wrapper provide the cleanup finally block; staged ONLY that one file to avoid the LFS-blob corruption that rejected both prior attempts.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • Renamed MTPEagleDynamicTreeWorker.forward to _forward_impl to comply with the SpecWorkerBase.__init_subclass__ guard.
  • Preserved the existing implementation, signature, NVTX decoration, and dynamic-tree behavior.
  • Allows the inherited SpecWorkerBase.forward wrapper to handle spec-dec attention-metadata cleanup and restores pytest collection.
  • No configuration, test-list, or test-code changes.

QA Engineer Review

No test changes.

…rward_impl

MTPEagleDynamicTreeWorker (added by NVIDIA#15582) overrode SpecWorkerBase.forward,
which the __init_subclass__ guard (nvbugs/6442074) forbids. This raised a
TypeError at import time, breaking all pytest collection. Rename the method to
_forward_impl, matching the MTPWorker pattern, so the base forward wrapper
provides the guaranteed spec-dec attn-metadata cleanup.

Signed-off-by: Chenfei Zhang <chenfeiz@nvidia.com>
@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: bcdcead3-5f7f-4726-9458-7c09784d9609

📥 Commits

Reviewing files that changed from the base of the PR and between 9cd6a49 and 11943df.

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

Walkthrough

The dynamic-tree worker’s top-level method is renamed from forward to _forward_impl. Its implementation, call signature structure, NVTX decoration, and speculative decoding behavior remain unchanged.

Changes

Dynamic tree entry point

Layer / File(s) Summary
Rename dynamic-tree forward entry point
tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py
MTPEagleDynamicTreeWorker.forward(...) is renamed to _forward_impl(...) without changing the method body.

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

Possibly related PRs

Suggested reviewers: sunnyqgg

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific, matches the code change, and identifies the bug ticket and fix.
Description check ✅ Passed It explains the root cause, fix, and test plan, with only template-specific headings and checklist items missing.
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.

@yuxianq

yuxianq commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Duplicated with #16724

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.

2 participants