Repository navigation
fix: correct TRT-LLM MLA labels and GPT-OSS MXFP4 profiles #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ce9a396
fix: record TRT MLA precision and allow native MXFP4 padding
simone-chen b73705b
fix: refresh TRT profiles and recover all 263 Gym predictions
simone-chen 3830b5a
fix: align GPT-OSS MoE bias and native autotuning
simone-chen a85b9e1
fix: refresh tuned GPT-OSS profiles and verify Gym TPOT
simone-chen 9076236
docs: verify GPT-OSS serving activation precision mismatch
simone-chen 6b79d38
fix: align TRT W4A8 data and replay request sampling
simone-chen 5afc9d6
Merge main and preserve replay sampler documentation
simone-chen 1c3d30b
ci: fetch numerical baseline outside squashed main history
simone-chen e36bfe5
fix: align collection provenance and validate NumPy seeds
simone-chen 8bcc5d1
docs: record matched TRT residual diagnosis
simone-chen 0c25eb9
docs: trace GPT-OSS eager execution gap
simone-chen cee6fdd
docs: clarify Qwen scheduling evidence scope
simone-chen 7fc50d0
chore: merge main and reuse baseline fetch helper
simone-chen 7d0bcac
fix: bound length sampler to direct synthetic replay
simone-chen 8ce3ef3
fix: reject length sampler at workload driver boundary
simone-chen 3bcbb43
chore: merge SGLang profile and CI fixes from main
simone-chen 5633a8f
fix: validate sampler before selecting replay execution mode
simone-chen a70df0a
fix: encode unavailable MoE power and align profile integrity checks
simone-chen b2193a4
Merge main package consolidation into TRT profile refresh
simone-chen 5518ec4
test: verify independent seeded replays
simone-chen 3c7edb1
test: cover TRT collector boundaries and clarify evidence
simone-chen f50d238
Merge main documentation updates into TRT profile refresh
simone-chen f26a1bc
Merge context-limit fix into TRT profile refresh
simone-chen f8c47a9
Merge replay correctness fixes into TRT profile refresh
simone-chen 076ca3a
fix: reject MoE collection when all autotuning attempts fail
simone-chen 8fa73a0
Merge FPM DCP identity fix into TRT profile refresh
simone-chen b7818d9
Merge DeepSeek V4.1 support into TRT profile refresh
simone-chen 635372e
docs: clarify non-DP readmission evidence scope
simone-chen f14fedd
Merge current replay and Sweeper changes into TRT profile refresh
simone-chen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # TRT-LLM eager execution: proposed measurement contract | ||
|
|
||
| Status: deferred at the user’s request. Retain collection evidence; do not | ||
| extend the data contract or implement a timing correction. The proposal below | ||
| is preserved for a future decision. | ||
| The current GPT-OSS op-based prediction still omits a material host execution | ||
| boundary. See the [trace report](../python/aisimulate/collector/trtllm/gym-gpt-eager-20260918.md) | ||
| for measured evidence and its limits. | ||
|
|
||
| ## Problem | ||
|
|
||
| GPT-OSS-120B, B200 TP2/EP1, 1k/1k, concurrency 4 reproduces client TTFT at | ||
| 48.86 ms versus a 16.53 ms prediction. The corrected MXFP4/MXFP8 MoE kernel | ||
| cost is close to the trace. Eager prefill/mixed execution has substantial CPU | ||
| submission gaps and cross-rank waiting; graph decode does not have the same | ||
| boundary. Increasing the shared MoE kernel table would charge that delay to | ||
| graph decode and erase its existing TPOT alignment. | ||
|
|
||
| ## Proposed coordinated change | ||
|
|
||
| Keep the op-based GPU model and add explicit execution-boundary measurements. | ||
| Do not insert an E2E-derived TTFT constant or a model-wide latency multiplier. | ||
|
|
||
| 1. Extend the collector output contract with an execution-mode identity | ||
| (`cuda_graph` or `eager`) and CPU dispatch timing. Preserve GPU latency as | ||
| a separate measurement. Record actual capture success, runtime source, | ||
| CPU model/affinity, rank membership, warmup policy and raw timing samples. | ||
| The measured runtime version remains part of the identity: rc14 host timing | ||
| must not be published as an rc20 measurement. | ||
| Existing rows without this evidence retain their legacy behavior; they | ||
| must not be relabeled as measured eager execution. | ||
| 2. Collect both modes at identical serving-selected modules, shapes, dtypes | ||
| and topology. Use phase-correct attention and fused all-reduce/norm | ||
| boundaries. Preserve the overlap within a module and between CPU and GPU; | ||
| a profiler's inflated CPU times are diagnostic evidence, not database rows. | ||
| 3. Carry the resolved TRT-LLM graph policy from Gym/runner into the native | ||
| performance model. Mixed/prefill selects eager measurements where the | ||
| pinned runtime cannot capture those steps. Decode selects graph data only | ||
| for captured shapes. Graph memory reservation is a separate setting. | ||
| 4. Compose host submission and GPU work with explicit dependencies. Do not | ||
| add CPU time to the sum of all GPU kernels, or separately add collective | ||
| waiting already caused by a late peer. Validate the composition against | ||
| complete, independent per-rank traces before enabling the new path. | ||
| 5. Keep missing eager coverage visible. Do not silently report a legacy | ||
| graph lookup as an eager measurement. Preserve the existing path for | ||
| configurations outside the qualified collection domain. | ||
|
|
||
| The exact row schema and composition must be frozen after the paired | ||
| measurement smoke, before formal collection. Approval would cover the | ||
| new execution-mode/CPU-timing contract and its producer/consumer work; it | ||
| is not an accuracy claim for an unmeasured composition algorithm. | ||
|
|
||
| ## Owners and affected surfaces | ||
|
|
||
| - Collector: `python/aisimulate/collector/trtllm/`, the network collector for | ||
| fused communication, perf schema/metadata, and collector tests. | ||
| - Data loading and native timing: `crates/core/src/perfmodel/perf_database/`, | ||
| `operators/`, and `engine/runtime.rs`; Python lowering and diagnostics. | ||
| - Deployment identity: Gym normalization, AISimulate runner/provider config, | ||
| and native engine config. Preserve actual graph capture coverage. | ||
| - Documentation and data: measured rows, immutable provenance, paired results, | ||
| missing coverage, and unchanged controls. | ||
|
|
||
| ## Acceptance checks | ||
|
|
||
| - The existing TP2/C4 workload retains its exact 40-request token vectors. | ||
| Repeated unprofiled serving measurements remain independent validation. | ||
| - Prefill, mixed, and graph decode are evaluated separately; complete rank | ||
| groups and timing boundaries are checked. CPU affinity is retained. | ||
| - Cover neighboring token counts and the affected GPT-OSS topologies, not | ||
| only the diagnostic 886-token step. Select collection points before looking | ||
| at validation errors. | ||
| - Replay all 31 GPT-OSS/B200 points. If shared timing or config code changes, | ||
| rerun all 263 points and retain every TTFT/TPOT regression and failure. | ||
| - Reject double counting with synthetic dependency tests; test graph/eager | ||
| selection at capture boundaries and explicit missing-data behavior. | ||
| - Report remaining queue/frontend error separately from forward error. | ||
| Do not claim the entire 32 ms client gap is a kernel or host-only delta. | ||
|
|
||
| ## Repository approval boundary | ||
|
|
||
| `python/aisimulate/.claude/rules/collector/layer_permissions.md` requires: | ||
|
|
||
| > Changing the data contract requires explicit human approval. | ||
|
|
||
| Adding execution-mode/CPU-timing fields changes the producer/consumer contract. | ||
| The current collection/fix request authorizes diagnostic collection; this | ||
| proposal makes the newly discovered contract extension reviewable before its | ||
| implementation. No collector policy file is changed. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.