Conversation
Avoid materializing softmax for greedy draft selection while preserving the established fallback path. Co-authored-by: Cursor <cursoragent@cursor.com>
Project only the selected draft-extend row through the LM head while preserving full hidden-state capture and gathered-buffer fallbacks. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep full-row LM-head projection as the default exactness path while allowing the selected-row optimization to be enabled explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve the AITER top-k fast path inside upstream's scoped MTP index-sharing lifecycle. Co-authored-by: Cursor <cursoragent@cursor.com>
Apply the repository's pinned Black formatting so the PR lint check passes. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve accelerator and GPU metadata at runtime so the benchmark can cover multiple architectures and model vocabulary sizes. Co-authored-by: Cursor <cursoragent@cursor.com>
e5a43cf to
47190af
Compare
Select AITER top-k1 and draft-extend row pruning from backend and buffer requirements instead of process-global optimization flags. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep CUDA and other backends on the established full-row LM-head path while sharing one ROCm eligibility gate across eager and graph execution.
Reuse the same raw-logit greedy helper as draft_forward so eligible ROCm requests no longer materialize a full-vocab softmax after selected-row LM-head pruning. Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse the same greedy helper as decode draft-extend so eligible ROCm requests no longer materialize a full-vocab softmax on the prefill seed. Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve the EAGLE top-k1 fast-path coverage alongside upstream's new idle-draft regression test. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace AITER's unmasked vector-tail argmax with the split Triton reduction so nonfinite and non-aligned vocabulary rows cannot emit out-of-range draft tokens while preserving the raw-logit fast path. Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse the existing postprocess entry point with an optional positions tensor, avoiding an extra wrapper and registry entry while preserving the bounds-safe ROCm path. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the runtime-context helper API migration while preserving ROCm draft-extend logit pruning. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the upstream benchmark scope so the PR contains only functional coverage needed for the ROCm Triton path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/rerun-failed-ci |
Move the independent ROCm top-k1 selector work to sgl-project#35872 so this PR only projects selected draft-extend rows through the LM head. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
/rerun-failed-ci
|
…aft-topk1 Co-authored-by: Cursor <cursoragent@cursor.com>
Bring the eager-only follow-up onto the latest upstream baseline before revalidating its incremental value. Co-authored-by: Cursor <cursoragent@cursor.com>
Build on the graph-path implementation from sgl-project#35546 and retain only the incremental eager ROCm optimization, removing duplicated graph behavior and test coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Closing as superseded by #35546, which now owns selected-row LM-head pruning for the draft-extend CUDA-graph path. After merging current
Both arms completed all requests with identical input/output token counts. The signs reverse between C4 and C8, so the residual eager-only effect is indistinguishable from run variance. The earlier graph-enabled performance numbers primarily measured functionality that is now upstream through #35546. Validation after the rescope: 10 focused worker tests passed, 44 inherited selected-row infrastructure tests passed, and pre-commit passed. |
Motivation
During EAGLE draft extend, each request processes a fixed four-position window: one target-model token followed by three draft tokens. The draft model must process all four positions to update its KV cache, but only the hidden state at the last accepted position is used to predict the next draft token.
The existing path projects all four hidden-state rows through the large-vocabulary LM head and then discards three rows. This PR moves row selection before the LM head so only the required row is projected.
Modifications
spec_infoon eligible ROCm paths.The independent top-k1 softmax-skip optimization is intentionally handled by #35872.
Correctness
The tests cover hidden-state preservation, pruning eligibility, graph output sizing, and fallback behavior. A full InferenceX sweep completed every request at C4/C32/C64/C128.
Performance
rocm/sgl-dev:v0.5.18-rocm724-mi35x-20260825amd/Qwen3.5-397B-A17B-MXFP4Median throughput improves by 0.98% and median TPOT by 1.15%. C32 was repeated after an inconsistent first throughput result; the repeat above aligns throughput with its TPOT and E2E changes. C64 TTFT is a prefill-scheduling outlier: decode TPOT, E2E latency, and throughput all improve at that point.
Checklist
CI States
Latest PR Test (Base): ❌ Run #33704304480
Latest PR Test (Extra): ❌ Run #33704304000
Latest PR Test (AMD ROCm 7.2): ⏳ Run #33704304319