Skip to content

[https://nvbugs/6468821][fix] Rename the dynamic-tree worker's forward override to _forward_impl - #16741

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

[https://nvbugs/6468821][fix] Rename the dynamic-tree worker's forward override to _forward_impl#16741
chenfeiz0326 wants to merge 1 commit into
NVIDIA:mainfrom
chenfeiz0326:repair-bot-bug6468821

Conversation

@chenfeiz0326

@chenfeiz0326 chenfeiz0326 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: MTPEagleDynamicTreeWorker overrode SpecWorkerBase.forward, which init_subclass forbids, raising TypeError at import and making import tensorrt_llm fail so the attention test collected 0 items.
  • Fix: Rename the dynamic-tree worker's forward override to _forward_impl, matching the SpecWorkerBase contract and its parent MTPEagleWorker._forward_impl, so the base forward wrapper (with metadata cleanup) is preserved.
  • 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(...) without changing its signature or implementation.
  • Aligns the worker with the SpecWorkerBase contract and the existing MTPEagleWorker pattern, preventing the import-time TypeError while preserving base-wrapper metadata cleanup.
  • No configuration, test-list, performance, or error-handling changes.

QA Engineer Review

No test changes.

…ard_impl

MTPEagleDynamicTreeWorker overrode SpecWorkerBase.forward, which
__init_subclass__ forbids (the base forward guarantees spec-dec
attn-metadata cleanup, nvbugs/6442074). The TypeError raised at class
definition broke 'import tensorrt_llm', so unrelated tests collected 0
items. Rename the override to _forward_impl to match the contract.

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: cc9474db-1808-4f69-b45e-74372363e129

📥 Commits

Reviewing files that changed from the base of the PR and between 45d1c11 and 85ad978.

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

Walkthrough

MTPEagleDynamicTreeWorker.forward(...) is renamed to _forward_impl(...) without changing its signature, implementation body, or NVTX annotation.

Changes

Dynamic tree worker entry point

Layer / File(s) Summary
Rename worker implementation method
tensorrt_llm/_torch/speculative/mtp_dynamic_tree.py
Renames MTPEagleDynamicTreeWorker.forward(...) to _forward_impl(...) while preserving the method implementation and @nvtx_range("mtp_dyn.forward") annotation.

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

Possibly related PRs

Suggested reviewers: zhaoyangwang-nvidia

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change and includes the bug ID and fix type.
Description check ✅ Passed The description includes a clear summary, test plan, and bug link, so it is mostly complete despite not matching the template exactly.
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 23, 2026

Copy link
Copy Markdown
Collaborator

The same fix #16724 has been merged, close this PR.

@yuxianq yuxianq closed this Jul 23, 2026
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