Skip to content

[Fix] Skip a draft's decode recapture when it owns no decode graph - #42347

Merged
ch-wan merged 1 commit into
mainfrom
cheng/hot-fix/draft-graph-recapture
Oct 3, 2026
Merged

ch-wan merged 1 commit into
mainfrom
cheng/hot-fix/draft-graph-recapture

Conversation

@ch-wan

@ch-wan ch-wan commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

This PR is part of a stack (oldest at bottom):

Motivation

update_weights_from_disk(recapture_cuda_graph=True) recaptures the decode CUDA graph of every selected runner, draft runners included. A speculative worker that captures its draft's graphs inside the draft placement scopes asks the draft runner for no decode graph of its own (init_cuda_graphs(capture_decode_cuda_graph=False)), which leaves the runner's eager runner in the decode slot.

Recapturing there runs outside those scopes. For a draft the capture clears the slot and then raises, so the runner is left without even the eager fallback it had.

Modifications

A draft runner recaptures only a decode graph it captured itself: the slot holds neither None nor its own eager runner. Target runners recapture as before.

Accuracy Tests

H200, Qwen3-8B with the AngelSlim/Qwen3-8B_eagle3 draft, --tp-size 2, GSM8K 300 questions: 0.950 plain and 0.947 with --attn-dp-size 2, against base runs of 0.953 / 0.947 and 0.950 / 0.950. Greedy text (4 prompts × 48 tokens) is byte-identical across every run.

On a live server, both draft runners report their eager runner in the decode slot, in plain and attention-DP layouts alike, which is the state the guard now recognises. test_draft_graph_recapture.py fails with the guard reverted and passes with it.

unit/spec and unit/model_executor: same results as the parent commit.

Speed Tests and Profiling

Not applicable.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): 🚫 Run #37156590555
Latest PR Test (Extra): ❌ Run #37156590143
Latest PR Test (AMD ROCm 10): ❌ Run #37156590452

@ch-wan
ch-wan force-pushed the cheng/hot-fix/draft-tensor-update-rank branch from a778835 to f77b7d1 Compare October 3, 2026 06:40
@ch-wan
ch-wan force-pushed the cheng/hot-fix/draft-graph-recapture branch from e1ccd28 to 7a0d2d9 Compare October 3, 2026 06:40
@ch-wan
ch-wan force-pushed the cheng/hot-fix/draft-tensor-update-rank branch from f77b7d1 to a68f602 Compare October 3, 2026 21:51
Base automatically changed from cheng/hot-fix/draft-tensor-update-rank to main October 3, 2026 21:52
`update_weights_from_disk(recapture_cuda_graph=True)` recaptures the
decode graph of every selected runner. A spec worker that captures its
draft's graphs inside the draft placement scopes asks the draft runner
for no decode graph, so the runner keeps its eager runner in that slot.
Recapturing there runs outside those scopes, and for a draft the capture
clears the slot and then raises, leaving the runner without even the
eager fallback. A draft runner now recaptures only a decode graph it
captured itself; target runners recapture as before.
@ch-wan
ch-wan force-pushed the cheng/hot-fix/draft-graph-recapture branch from 7a0d2d9 to afb8b1d Compare October 3, 2026 21:53
@ch-wan
ch-wan merged commit b2aa993 into main Oct 3, 2026
70 of 81 checks passed
@ch-wan
ch-wan deleted the cheng/hot-fix/draft-graph-recapture branch October 3, 2026 21:54
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.

1 participant