Repository navigation
config: borrowed-record reads follow the config bags - #35908
Merged
Merged
Conversation
ch-wan
requested review from
Alisehen,
AniZpZ,
BBuf,
CatherineSue,
Edwardf0t1,
FlamingoPg,
Fridge003,
HaiShaw,
OrangeRedeng,
Qiaolin-Yu,
Ying1123,
alphabetc1,
b8zhong,
hanming-lu,
hebiao064,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
jybsuper,
kpham-sgl,
lifuhuang,
merrymercy,
mmangkad,
pyc96,
slin1237,
xiezhq-hermann,
yizhang2077,
yuan-luo and
yushengsu-thu
as code owners
August 21, 2026 19:17
ch-wan
requested review from
AgainstEntropy,
mickqian and
yichiche
as code owners
August 21, 2026 23:33
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 21, 2026 23:34
4ec6b36 to
f39d2af
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 00:48
6a7f8fb to
0ae528a
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 00:48
f39d2af to
15c3f11
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 05:58
0ae528a to
3f2e968
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 05:58
15c3f11 to
902f0f8
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 07:28
3f2e968 to
515bb51
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 07:28
902f0f8 to
d9d3103
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 07:32
515bb51 to
f94bc8b
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 07:32
d9d3103 to
8ab79d3
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 09:38
f94bc8b to
2ceb518
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 09:38
8ab79d3 to
0170ec4
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 10:48
2ceb518 to
48b2540
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 10:48
0170ec4 to
ed1bccc
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 17:43
48b2540 to
50a4032
Compare
ch-wan
force-pushed
the
cheng/gc-pr4-borrowed-record-reads
branch
from
August 22, 2026 17:43
ed1bccc to
cf351f7
Compare
ch-wan
force-pushed
the
cheng/gc-pr3-resolution-gate
branch
from
August 22, 2026 18:25
50a4032 to
206c8a1
Compare
Weight loading, graph capture, the pool configurator, the forward-batch construction and the KV pool runtime reached the startup record through the runner they were handed -- `model_runner.server_args.field`. That spelling is the one no read census counts: a parameter read at least carries the supplied-instance contract, while a reference lifted off another object carries nothing, and once the record stays at the user's raw input these reads answer with the CLI default. They are bag reads now, except five that follow the configured stage count instead: the runner's layer window is arithmetic over configuration, and a draft runner shares the target's process groups, so the live property would answer for the wrong runner. Three fixtures move with them. The graph-capture tests hung a fake `cuda_graph_config` off a fake runner; the configuration is published now, and the chunk-shape cases drive it by mutating the object they published -- which is the same object the bag holds. Co-Authored-By: Claude Opus 5 <[email protected]>
…bags The same chain spelling, in the rest of the runtime: the Triton, AITER and DSA backends and the attention registry reached the record through the runner; the metrics reporter and the prefill/decode disaggregation loops reached it through the scheduler; the EAGLE draft graph runner through the runner it wraps. Two of them follow the configured stage count rather than the live group: the reporter labels its metrics with what the launch configured, and a draft runner shares the target's process groups, so the live property describes the wrong runner. Co-Authored-By: Claude Opus 5 <[email protected]>
The tail of the chain spelling: the FlashInfer, DeepSeek-V4, Wave, XPU, KDA and hybrid attention backends, the DeepGEMM compile cache, the shared graph output, the KV staging handler, the tree-cache registry, and three more draft graph runners. Twenty reads, each one lifted off a runner or a manager that happened to hold the record. Three more are the draft window over the target's stages again and follow the configured count. One fixture moves with them: the linear-attn stamp test built a runner double whose fake record carried the draft-token width, and the point of that test is that the only AttributeError comes from the missing stamp -- so the width is published now, and the double carries nothing that could answer for it. Co-Authored-By: Claude Opus 5 <[email protected]>
The last of the chain spelling, in the entrypoints: the gRPC bridge and the HTTP server reached the record through the tokenizer manager, and `/v1/loads` computed its accelerator counts the same way. These are readbacks, and which record answers depends on the question. "What was asked for" stays on the raw record. "What will this server actually do" -- the tokenizer path a request will use, whether LoRA is available, the sampling defaults a completion inherits, how many accelerators back each DP rank -- is the resolved answer, so it comes from the bags. The `/v1/loads` fixtures publish the shape under test rather than hanging it off a fake manager; `tp_size` stays on the double, because raw input is exactly what the record is for. With this the chain spelling is out of the resolution-written surface altogether: 105 reads across 36 files at the start of the sweep, none left. Co-Authored-By: Claude Opus 5 <[email protected]>
Twenty-five reads where a function was handed the record and took a resolved value off it: the rust server and the tokenizer control paths, the prefill delayer, the KV cache configurator and builder, the disaggregation backend selection, the KT EP wrapper, the unquantized linear's deterministic switch, the Marlin LoRA placement check, the piecewise graph configuration, the CUDA VMM transport and the model-file verifier. Raw fields stay on the record. A callee reading `server_args.host` is reading what the caller asked for, which is what the record is for; only the leaves resolution fills in have to move, because those are the ones that answer with a CLI default once the record stops carrying them. `build_sidecar_endpoint` keeps its argument instead of half-reading one: it is a string helper over a host and a port, so the caller passes the resolved port rather than the helper reaching for it. The Marlin LoRA validation is the exception that proves the rule: the pipeline calls it, so the bags do not exist yet, and it already receives the resolving view for the two other fields it checks. Its LoRA switch reads that view. Co-Authored-By: Claude Opus 5 <[email protected]>
Setting up the process groups is the first thing a model runner does after it publishes, so the switches it consults -- the NCCL pre-warm, the custom all-reduce and symmetric-memory flags, the FlashInfer fusion backend, the MoE all-to-all backend -- come from the bags rather than from the record it was handed. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Stack
Part of a series that moves
ServerArgsfrom "mutate the record at construction" to "resolve once, publish into config bags". Each PR stands alone (builds, passes its own tests); review bottom-up.mainWhole-series CI vehicle (not for merge): #35917
Motivation
Components reached the startup record through whatever object happened to hold it —
model_runner.server_args.field,self.scheduler.server_args.field. A reference lifted off another object carries no contract, and no read census counted that spelling: it had grown to 105 reads across 36 files unnoticed. Once the record stays at the user's raw input, these reads answer with the CLI default.Modifications
configured_*()accessors (a draft runner shares the target's process groups, so the live property would answer for the wrong runner).Verification
Checklist
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): 🚫 Run #32627950438
Latest PR Test (Extra): 🚫 Run #32627950285
Latest PR Test (AMD ROCm 7.2): 🚫 Run #32627950435