Repository navigation
[Feat] runtime: Include FlashInfer’s default tactic in startup tuning. - #43927
Conversation
|
/rerun-test test/registered/unit/model_executor/runner/test_flashinfer_autotune_sync.py |
|
🚀 |
|
/rerun-test test/registered/e2e/quantization/test_modelopt_fp8.py::TestModeloptFP8.test_gsm8k |
|
🚀 |
|
/tag-and-rerun-ci |
|
/rerun-failed-ci |
Picks up the required CI base commit (MIN_BASE_SHA ff8d964, sgl-project#44192) so the CI rebase-required gate passes: https://github.com/sgl-project/sglang/actions/runs/38414642894/job/115581851667 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
[by Claude Code] I've started babysitting the NVIDIA CI of this PR. I'll check it every 30 minutes until all NV pipelines pass. If a relevant job fails, I may rerun it, merge the latest Anyone can stop me at any time: just post a comment asking me to stop (for example, |
Picks up sgl-project#44235, which fixes the unrelated CI failure https://github.com/sgl-project/sglang/actions/runs/38519741262/job/115718261160 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
merging since all stages a/b/c have passed. |
sgl-project#43927) Co-authored-by: Po-Han Huang <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 33618d4) (cherry picked from commit 5bd91df552edb52bdd7c2dfabf35bd21a3cf8744)
sgl-project#44514 from port-autotune (entries 257-260) Batch 2 of the 2026-10-28 second wave. Four picks landed CLEAN in strict order onto the comm docs tip -- code tip 2705ebb: f46e547 sgl-project#40420 (open port, EP autotune-cache digest: per-rank caches no longer dropped every startup; worker RED-proof 2F->2P), 894d4a7 sgl-project#45543 (open port, seeded distinct dummy token ids for the decode MoE autotune; base_runner union preserves the entry-176 EXTEND call site; upstream-only TestModelPrefillAutotune NOT carried in -- autotune_prefill_kernels absent, grep-verified), 6c866f3 sgl-project#43927 (merged pick 33618d4, default tactic joins tuning -- PARTIALLY SATISFIES the C0a sweep-gap record; entry-243/246 'no tactic=-1' PASS-needles STALE, CAVEATS bullet added), 2705ebb sgl-project#44514 (merged pick 1897575, cache-key bump -> exactly ONE cold autotune boot, entry-228 boot-cost practice). Header bookkeeping for BOTH batches: STACK bumped to qwennext-stack-260-2026-10-28 with the comm + autotune wave lines, entries 1-260, tip 2705ebb, updated: 2026-10-28 (entries 255-260) block. FAM-A1 LANDED + NEW TODO S-EXT1 (stack-owned: EXTEND autotune still tunes on zero-filled dummies -- the bug sgl-project#45543 fixed for decode). Verified at landed tips (prod venv, CVD=9), all EXACT vs predictions: sync+gate 22P/1S/5sub, runner dir 89P/1S/47sub, MoE set 139P/22S/141sub, qwen4_exp_ple_staging 37P; comm named set 114P/1S/30sub, dir 120P/1S/35sub 0F, new comm files collect 18. In-flight workers NOT landed -- no drift attributable. NOTHING PUSHED.
…k-274, wanted_stack LANDED marks, CAVEATS docs-only ledger items (A) Header: STACK line 260->274; three wave lines (+spec-mamba-2026-10-28 (pr45491+pr45435+pr45472+pr45670), +admission-2026-10-28(pr46272*+ pr43484*+pr46496*+pr46643*+pr45607*+pr45789*), +parsers-2026-10-28 (pr44124+pr45631+pr45855+pr46167)); tip line -> 2714457; updated 261-274 headline block (entry-119 SUPERSEDED by upstream sgl-project#45435/sgl-project#45472; classic-pool mamba admission gate w/ upstream ImportError CAUGHT; UNCONDITIONAL latch reset = TTFT watch; coder-parser union; logits trilogy as CONTRACT UNIT; 14 picks, 0 integrator conflicts). (B) wanted_stack.txt: FAM-A5 + FAM-B234 blocks deleted -> LANDED records (chain shas, interlock audit, supersession + behavior-change pointers into entries 261-270); SECTION-B sgl-project#44124/trilogy blocks -> LANDED; sgl-project#37958/sgl-project#45559 block -> DONE (verdict now in CAVEATS). (C) DOCS-ONLY LEDGER ITEMS: CAVEATS gains the sgl-project#37958/sgl-project#45559 VERIFIED- INERT bullet (two independent hard gates, coarse-barrier fallback, do-not-re-litigate-at-merge-sgl-project#5 line, revisit condition = dropping NEXTN or HiCache) and the dated C0b/C0c corrections (sgl-project#44030 obsolete rationale, sgl-project#44858 REVERSED by sgl-project#45289 [ported-pending wt-moe], sgl-project#44115 permanent N/A, 10-28 open-status re-verification list, no-pin-moves note: 0.7.2/0.4.9 floor unchanged) with the C0a tick (sgl-project#37625/sgl-project#37941/sgl-project#39727 still outstanding; only sgl-project#43927/sgl-project#44849 partially satisfied). C0b/C0c/C8 marked DONE in wanted_stack; C0a stays open.
Motivation
Startup tuning can omit FlashInfer's default tactic (
-1) and select an explicit tactic even when the default is faster for the profiling inputs. This adopts v2 candidate selection with existing v1 persistence.Modifications
autotune_v2from FlashInfer and enterautotune_v2(mode="tune", persistent_cache=False)immediately after the existingautotune(...)context. Measurement policy remains unspecified.autotune_v2stub to the existing upstream startup-test fixture, which already mocks the v1 tuner. No new test is added.Accuracy Tests
Current commit:
e4be6ffca60afd66198b53981f275b543f5ec624, merging upstream27b68303d043ddbddf9861c55c26bc8617ea7c35. Relative to that upstream commit, the PR adds three production lines and one existing-fixture line. FlashInfer remains pinned to0.7.1.The current merged commit has passed the local suite and repository checks below; new-head GitHub CI is pending. The following H100 results ran on the prior head
0ad44b07144da52c6af842c44b961b373afb20b0, before merging main:2.14.1, FlashInfer0.7.1; the existing CUDA cache-persistence case and all three real two-rank Gloo tests executed.TestModeloptFP8.test_gsm8k,nvidia/Llama-3.1-8B-Instruct-FP8, 200 examples, score0.745against the strict> 0.70threshold, PyTorch2.14.1, FlashInfer0.7.1. Logs confirm the startup autotune context completed and CUDA Graph capture and serving succeeded. This run does not independently establish a-1winner or cold/warm reuse.The RTX 5090 validation below ran on
a9c46a964dfb87ad218d2460198848d8580bfd14before the test-only removal and upstream merge. The historical 12-test CUDA run and pre-fix control include the subsequently removed regression.Historical CUDA registered suite: 12 passed, zero skips/failures/errors, 212.267 seconds. All 11 existing tests plus the subsequently removed regression passed, including all three real two-rank Gloo cache tests.
Historical pre-fix control reproduced the regression: replacing only the v2 context with
nullcontext()produced two expected subtest assertion failures, zero errors, in 0.439 seconds. The default-winner case selected0instead of-1; the explicit-winner control showed-1missing from profiling.Numerical smoke through the SGLang wrapper: all six phases passed. Real FlashInfer
bmm_fp8, backendcublas, FP8 E4M3 inputs, BF16 output,[B,M,N,K]=[1,128,64,256], compared with FP32torch.bmmof the quantized inputs atrtol=0.02,atol=0.25.Cold tuning made 72 profiling calls, including 8 for
-1, and saved 8 v1 winner entries. Warm reuse made 0 additional profiling calls, including bare eager execution and graph replay.CUDA environment: native x86_64, RTX 5090 (SM120), driver 615.36, Python 3.12.3, PyTorch 2.13.0+cu130, CUDA 13.0, exact FlashInfer 0.7.1. SGLang Python sources were overlaid from the validated commit. The throwaway container used FlashInfer source JIT after removing its older optional 0.6.18 binary providers. Image:
lmsysorg/sglang@sha256:2dbe4c7f53230b09aaa8fa41891c13c51d9d2e253f486a70822aaf08783fff75(amd64). The validation allocation completed with exit 0 and released its GPU.Executed commands with
PYTHONPATH=/tmp/sglang-default-tactic-2485957-0/fi:/run/source/python:PYTHONPATH=python /private/tmp/sglang-default-tactic-venv/bin/python test/registered/unit/model_executor/runner/test_flashinfer_autotune_sync.py -vwith task-local cache directories.pre-commit run --files python/sglang/srt/model_executor/runner/flashinfer_autotune.py test/registered/unit/model_executor/runner/test_flashinfer_autotune_sync.py(all applicable hooks, including formatting and registry checks), plusgit diff --check.0ad44b0714. The current merged head's lint check is pending.Pending: GitHub CI on the current merged commit, including CUDA validation. The PR is ready for review and has the
run-cilabel. H100 unit and model-accuracy runs used the repository's PyTorch 2.14.1 pin on the prior head; the separate six-phase numerical smoke used 2.13.0. Repeating that numerical smoke with 2.14.1 remains pending.Speed Tests and Profiling
Serving performance remains unmeasured. Historical controlled timings and numerical-smoke profiling-call counts establish selection and cache behavior; no serving-performance improvement is claimed.
CI States
Latest PR Test (Base): 🚫 Run #38552427356
Latest PR Test (Extra): ❌ Run #38552427316
Latest PR Test (AMD ROCm 10): ❌ Run #38552427203