Skip to content

[Spec] Support large MTP batches in short-convolution metadata - #38558

Merged
Qiaolin-Yu merged 2 commits into
sgl-project:mainfrom
paulzhang-tm:codex/sconv-large-mtp-batches
Sep 10, 2026
Merged

Qiaolin-Yu merged 2 commits into
sgl-project:mainfrom
paulzhang-tm:codex/sconv-large-mtp-batches

Conversation

@paulzhang-tm

@paulzhang-tm paulzhang-tm commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Inkling MTP batches above 1,023 requests can fail during target-verify or draft-extend CUDA graph capture. The fused short-convolution metadata helper rejects these shapes, and the backend cannot use its allocating unfused fallback on the graph path. For example, a 1,264-request batch hits this assertion during startup.

Modifications

  • Support variable-length batches through 2,047 requests. For batches above 1,023, halve the token tile from 256 to 128 as the boundary tile doubles to 2,048, keeping the maximum comparison tile at 262,144 elements.
  • Exempt uniform-length target verification from this batch-size cap: its boundary and sequence-index calculations use arithmetic rather than the cumulative sum and comparison reduction.
  • Add exact-reference checks at the new boundaries and CUDA graph replay coverage with changed lengths, initial-state flags, and padding slots. Preserve representative PR CI cases and the complete nightly matrix.

Accuracy Tests

  • Offline Triton compilation passed for all four metadata modes on both sm_90 and sm_100 (eight variants), using the larger variable-length tile and verification beyond the variable-length bound.
  • Both metadata test suites collect successfully: 119 tests skipped because no CUDA device is available in this checkout. GPU numerical comparisons and replay execution remain to be run in CI.
  • The representative PR CI selection collects 25 extend-metadata tests, including the new large-batch and replay cases.
  • Ruff formatting/lint, isort, registered-test validation, and repository Python test-layout checks passed.

Speed Tests and Profiling

No end-to-end benchmark was run. Existing batches through 1,023 requests retain their kernel tile dimensions; larger variable-length batches use more token tiles while keeping the maximum comparison tile size unchanged.


CI States

Latest PR Test (Base): ❌ Run #34398853369
Latest PR Test (Extra): ❌ Run #34398853034
Latest PR Test (AMD ROCm 10): ❌ Run #34398853282

@Qiaolin-Yu Qiaolin-Yu added run-ci CI: run the baseline test suite on this PR bypass-fastfail labels Sep 9, 2026
@Qiaolin-Yu
Qiaolin-Yu merged commit a63efd9 into sgl-project:main Sep 10, 2026
168 of 189 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bypass-fastfail run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants