feat: add AFD prefill performance simulator - #269
Merged
jiangkuaixue123 merged 1 commit intoAug 26, 2026
Merged
Conversation
Signed-off-by: jiangkuaixue123 <jiangxiaozhou111@163.com>
jiangkuaixue123
force-pushed
the
codex/add-prefill-performance-simulator
branch
from
August 25, 2026 12:03
eae9e5c to
df8033d
Compare
9 tasks
jiangkuaixue123
pushed a commit
that referenced
this pull request
Aug 26, 2026
## Purpose Extend the experimental DeepSeek-V4-Flash prefill simulator introduced in #269 so AFD and merged deployments can be compared across equal-die topologies, independent batching policies, chunked FIFO waves, and burst-preserving production-like length traces. This also checks in the normalized analytic profiles and prompt-free MoonConv arrival/length fixtures so a fresh clone can use the WebUI without installing msModeling or downloading prompt token IDs. ## Issue - Related issue(s): follow-up to #269 - Closing keyword: none ## Scope - In scope: - Simulator-only scheduling, workload, profile, HTTP, and WebUI changes. - Independent AFD and merged max-batch/chunk controls and DPLB policies. - FIFO wave estimators using token sum or token-square work. - Equal-die dynamic topology selection and profile composition/reuse. - Canvas/LOD timeline rendering for large event sets. - QPS-scaled MoonConv V4 traces that preserve zero-gap bursts. - Checked-in 64K analytic profiles for 16/24/32/40/48-die comparisons. - Out of scope: - Production AFD runtime behavior changes. - Decode, KV-transfer, capacity/eviction, EPLB, or real expert skew. - GPU/NPU execution or msModeling calibration against hardware. ## Implementation Notes - The experimental scheduler configuration is intentionally breaking: the shared policy and batch-token fields are replaced by architecture-specific AFD and merged settings. - Current-runtime policy models AFD as round-robin on the present async engine path and merged as vLLM queue-aware DPLB. - Chunked requests retain FIFO order; unstarted waves are not arbitrarily reordered. - AFD DP replication reuses per-DP msModeling points when TP and FFN EP are unchanged. Merged TP/global-EP changes use independently generated profiles. - Every comparison validates equal physical die budgets from profile topology metadata. - scaled_trace preserves all relative intervals and simultaneous bursts, rescales the complete cycle to the configured mean QPS, and repeats the cycle across long warmup/measurement windows. - MoonConv fixtures contain only arrival_time_ms and input_length. Source revision, hashes, ODC-By attribution, and exclusions are documented under simulator/data/README.md. - No vLLM checkout, compatibility shim, monkey patch, or plugin runtime class is changed. ## Test Plan - python -m ruff check simulator - python -m unittest discover -s simulator/tests -v - Load every checked-in profile and validate its AFD/merged die budget. - Start the HTTP server with all profiles and smoke each newly added topology. - Replay MoonConv formal_0 at target 4 QPS with 32K chunking. ## Test Result - Ruff: passed. - Simulator unit tests: 47 passed. - Profiles: all 9 checked-in JSON bundles loaded; all equal-die checks passed. - Dynamic topology API: 6 AFD choices and 8 merged choices returned; all three newly requested pairings completed simulation smoke tests. - MoonConv 4-QPS smoke: 284 generated arrivals, including 255 preserved zero-gap arrivals; 249 requests landed in the 60-second measured window. Finite-window offered QPS was 4.15 because burst boundaries are preserved; each complete repeated cycle averages exactly 4 QPS. - GPU/NPU E2E: not run because this PR changes only the dependency-free analytic simulator. ## Docs Impact - Files updated: simulator/README.md, simulator/profiles/README.md, and simulator/data/README.md. - The docs cover topology budgets, device/die terminology, scheduler semantics, scaled trace behavior, profile generation/reuse, dataset provenance, and WebUI operation. --- <details> <summary>Essential PR Checklist</summary> - [x] Purpose is clear and linked to public context when possible. - [x] Scope is bounded. - [x] Compatibility with vLLM v0.26.0 is considered. - [x] No changes are made to the vLLM source checkout. - [x] Plugin-owned classes or explicit dotted class paths are preferred over monkey patches; this PR changes no runtime classes. - [x] No compat shim or monkey patch is added. - [x] Imports remain CPU-safe; the simulator uses the standard library at runtime. - [x] Validation evidence is included, including the GPU/NPU skip reason. - [x] Documentation impact is stated. </details> --------- Signed-off-by: ShwStone <HaowenShi@outlook.com>
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.
Purpose
Add a Python prefill performance simulator for comparing asynchronous Attention/FFN disaggregation against the merged DP4/TP4/EP16 architecture using normalized msModeling analytic profiles.
Issue
Scope
Implementation Notes
Test Plan
CPU-only:
.venv/bin/python -m pre_commit run.venv/bin/python -m unittest discover -s simulator/tests -v.venv/bin/python -m compileall -q simulatorGPU/NPU-gated:
Test Result
Docs Impact
simulator/README.md,simulator/profiles/README.md, examples, and complete configuration-field documentation.Essential PR Checklist