Repository navigation
[Benchmark] Remove obsolete auto-benchmark remnants - #31941
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
BBuf
marked this pull request as ready for review
July 21, 2026 12:34
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
Author
|
/tag-and-rerun-ci extra |
Zhylkaaa
pushed a commit
to Zhylkaaa/sglang
that referenced
this pull request
Jul 29, 2026
shuwang21
added a commit
to shuwang21/sglang
that referenced
this pull request
Sep 3, 2026
Introduces `sglang.autotune`, one framework for two layers of tuning for a (model, platform): the inner layer tunes kernels and dispatch heuristics (triton fused MoE tile sizes, cutlass variants, allreduce algorithm, attention / MoE backend choice, speculative parameters per batch size), the outer layer searches the deployment configuration space (parallelism, scheduler and memory knobs) under a workload and SLA. The top-level command is `python -m sglang.auto_tune --model-path X --tp N`. This commit lands the design doc and the abstractions only; no concrete space, strategy, driver, store, or reporter yet. Design (docs/developer_guide/auto_tune_design.mdx): - greenfield: the previous `sglang.auto_benchmark` was removed in sgl-project#31941, so there is no compatibility burden. Its failure modes are recorded as design rationale. - kernel tuning is the inner layer, not a non-goal: the existing per-kernel scripts (`benchmark/kernels/**/tuning_*.py`) become drivers. The outer layer pins tp/ep, runs the inner layer for that parallelism, then searches the remaining knobs. Rollout starts with the triton fused MoE driver and the `sglang.auto_tune` front; the serving driver comes later. - builds on `sglang.benchmark` (serving, offline_throughput, steady_state, datasets) rather than forking a benchmark client. `run_benchmark()` writes a module-global `args`, so concurrent trials must run their client in separate processes. - ranks on the steady-state window so candidates are not compared on their ramp-up transient. `steady_state_serving.run_steady_state_benchmark()` is the entry point; `serving.py` does not call it. - knobs come from the `Annotated[..., Arg(...)]` field metadata on `ServerArgs` rather than from argparse parser internals, so the coupling is to a declared contract. Abstractions (python/sglang/autotune/): - types.py Point, Trial, Measurement, Workload, LoadPoint, Fidelity, Provenance, Budget, TrialStatus, FailureKind - space/base.py Space, Knob, Domain, FeasibilityRule, Conditional - strategy/base Strategy (ask/tell), StrategyState - executor/base Executor, SerialExecutor, TrialSlot, Submission - measure.py MeasurementDriver, LoadPlan, CapacitySearch - objective.py Objective, Constraint, MetricThreshold, rank_by_bucket, pareto_front - store.py TrialStore - report.py Reporter - registry.py per-kind name -> class registries - orchestrator the ask/run/tell loop Invariants the abstractions exist to enforce: - feasibility is separate from quality, so a candidate that violates the SLA can never outrank a compliant one; - a constraint is validated against the metrics its driver declares it emits, so a threshold cannot be silently ignored; - ranking is per point, not per measurement: a point is measured once per (workload, load) and is feasible only if every one of those measurements is, with `Objective.aggregate()` as the hook that combines them; - only full-fidelity measurements enter the final ranking, so a winner is never declared on a reduced-fidelity rung; - every submitted trial yields exactly one measurement, cancelled ones included, so the orchestrator's in-flight accounting cannot deadlock; - results are ranked per bucket (`Trial.bucket`, named by `TuneTask.bucket_of`): kernel tuning gets one winner per shape or batch size, which is the table a kernel's config file or a dispatch heuristic needs, and deployment tuning is the one-bucket special case with a single best.yaml; - the driver contract assumes no server: launch-command and config rendering are optional, and a driver that sweeps many candidates in one call (cutlass profiler) attaches the rest as `Measurement.discovered`, deduplicated by trial key. Per-trial limits -- the timeout derived from the remaining budget, and the strategy's prune predicate -- travel with the submission rather than being installed on the executor, so an executor that hands work to a subprocess or another host has nothing to look up. Next (P1): a mock executor exercising the loop with no GPU, the `grid` strategy, a JSONL store, the triton fused MoE kernel driver with shape derivation from (model, tp, ep, dtype) and a per-shape JSON reporter, and the `sglang.auto_tune --model-path --tp` front. Co-Authored-By: Claude Opus 5 <[email protected]>
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sglang.auto_benchmarkCLI and orchestration libraryautobenchdataset adapter, registry entry, and serving CLI choiceWhy
The in-repository
llm-serving-auto-benchmarkskill was removed in #29487, butits Python support code remained behind. A repository-wide reference audit
found no callers outside the old entry point, dataset registration, and the
subsystem's own tests. Keeping this unsupported workflow in the public package
causes confusion and leaves more than 3,000 lines of unmaintained code.
Impact
python -m sglang.auto_benchmarkandbench_serving --dataset-name autobenchare removed. Other benchmark datasets and serving behavior are unchanged.
Validation
python3 -m pytest test/registered/bench_fn/test_benchmark_datasets_api.py::TestBenchmarkDatasetsAPI::test_dataset_mapping_and_dispatch -qpre-commit run --files python/sglang/benchmark/datasets/__init__.py python/sglang/benchmark/serving.pygit diff --check origin/main...HEADrg -n 'auto_benchmark|autobench|AutoBenchmark' python test--dataset-namechoices inpython/sglang/benchmark/serving.pyCI States
Latest PR Test (Base): ⏳ Run #29830429642
Latest PR Test (Extra): 🚫 Run #29830640983