Repository navigation
placement: charge node 0 for row-table fills from NVMe - #333
Conversation
Count an NVMe table's gathered file bytes as both a pool read and a serial fill. The workload supplies the fill rate; a zero rate is refused only when a table needs it. Routed expert misses retain their own fill term.
There was a problem hiding this comment.
Verdict: CLEAN: The fill term is validated and added once per token outside the routed windows.
Non-blocking
⚠ Pin the fill charge with multiple active nodes: crates/placement/src/placement/nodes_scale.rs:983.
All fill-duration assertions use one node. By inspection, multiplying the fill in step_ps by used.len() leaves them green; the two-node refusal test asserts no duration.
Extend an existing multi-node clause with a stable split and assert one fill delta and unchanged per-node windows. This prevents a later per-node charge from passing the gate.
Checked
Duplicates: 0 new functions, types or constants; both new fields checked, with no duplicate owner. Dryer reported 0 pairs.
Complexity: checked_id_bytes rose 14 → 16 through one conditional rate-validation branch at the existing validation owner.
Silent failure: 3 sites followed to their consumers: unread rows add no fill, a required zero rate returns Undefined, and a wrong NVMe format returns a tensor error.
Tests, mutation inspection: dropping the fill at crates/placement/src/placement/nodes.rs:1285 fails n1_is_today; dropping the zero-rate refusal at crates/placement/src/placement/nodes.rs:713 fails named_refusals; changing > to >= at crates/placement/src/placement/nodes.rs:1156 fails nic_not_max at its exact-half boundary. The multi-node fill mutant survives the duration assertions.
Gates: no threshold, tolerance or lint pin moved. The PR includes FAIL-first output for accepting the NVMe table.
Escape catalog: no matching patterns.
Performance: planning code only; no decode, prefill or kernel work changed.
Notes
Tests were inspected, not executed here. The PR reports 134 passing placement tests, but no runs of just gate-placement or just gate-gpu-qwen38-nodes. It carries no qualifying GPU evidence.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
Refs #127.
What and why
This is the NVMe fill term of the node planner in
docs/contrib/dgx-spark.md(9.7, and Terms in 9.9), the open item that section 10 listed after #330 derived each node's budget from the census. A node plan can now take a row table that the tier plan left on the NVMe tier, such as V4.1'sengramtables, and it charges node 0 for filling the rows a token gathers from it. Before,Terms::ofrefused such a plan by name, so the node planner could not plan the V4.1 file at all.Release notes: internal: the node plans accept row tables left on the NVMe tier and charge node 0 a serial fill for the rows a token gathers; they take the fill rate as an input.
What changes:
Terms::ofcounts the gathered file bytes of a row on the NVMe tier twice: once in the pool read, as for a host row, and once in a newserial_nvmesum. It reusesRow::read_bytes, so no tensor size is computed a second time. A row table on the host, an unread table, and a row that is not an NVMe file segment add nothing toserial_nvme. An NVMe segment in any other format is refused as a tensor error.Workload::nvme_readis node 0's fill rate in file bytes a second.NodePlan::step_psaddsserial_nvme / nvme_readto the serial part of the step, once. It does not add it per routed window or per remote node.nvme_read == 0withserial_nvme != 0is a namedNodesError::Undefined. With no NVMe rows the rate may be 0.docs/contrib/dgx-spark.mdsays so. The rate is the caller's, so the code carries no drive speed of its own. This is the default I chose; the maintainer may prefer a cache or overlap model, and it would replace this one term.Workload::fills.NodeBudget,HostNeed, the unified pool, the arena floor androuted_heldare unchanged.docs/contrib/dgx-spark.mddescribes the term in the NVMe line of 9.7 and in 9.9 Terms and clause 1. The open item in section 10 moves to Closed with the limit above.What this PR does not do
n1_is_todayis a synthetic shape with an NVMe row table, so a plan of the real file is not shown to succeed.Code shape
Row::read_bytesand the existingpool_read. There is no new function, type, constant or public helper;serial_nvmeispub(super).Workload::nvme_readis read bychecked_id_bytesandNodePlan::step_ps.u64are named errors.cargo fmtandcargo clippyare clean on what I touched.cargo fmt --all -- --checkreturns 0 below, and the lint count matches main's.Duplication found or removed (
path:line), or "none": none.What I ran
The head is
fcd966fd. It merges intoupstream/main(98a513fc) without conflicts, asgit merge-tree --write-treeshows. The checks ran on a Mac with no GPU. I did not rebase onto98a513fcbecause its commit does not touch these files.n1_is_todaytest changed to expect success for V4.1 with an NVMe row table, run on the base8dc9ccc0V4.1's terms with a row table on the NVMe tier: Model(Tensor { name: "engram 0", detail: "rows read a token from the NVMe tier, which the node plans take no fill term for" })cargo fmt --all -- --check && cargo test -p bloomery-placement placement::nodes_scaletest result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 123 filtered outjust affected 8dc9ccc0 --no-boxgate-placementandgate-gpu-qwen38-nodesamong the gates this change reaches. The list is a static walk and ran no gatecargo fmt --all -- --check && bash tools/check-arch.sh && cargo test --release -p bloomery-placementon a DGX Spark (aarch64 Linux, GB10)test result: ok. 134 passed; 0 failedjust mac-static(lint)a688accb;check-recipesis red on both the same wayjust gate-placementjust gate-gpu-qwen38-nodescontrib-checkn1_is_todayis the test that holds the term. On a synthetic V4.1 shape with an NVMe row table it asserts thatserial_nvmeis the table's gathered bytes, that doublingnvme_readshortens the step by half of that fill, and that the host-resident table has no fill and a step shorter by the same amount. It also reads the Qwen3.8 tensor table to assert that an unread NVMe table adds no fill and that an NVMe segment in a host format is a tensor error.named_refusalsasserts that a rate of 0 is accepted with no NVMe rows, refused with them, and that a rate of 1 is accepted.Each of these mutations of the production code is covered by an assertion in those two tests, which I checked by reading the code and the assertions; I did not run the mutants: dropping the fill from
step_ps, ignoring the rate, charging an unread or host-resident table, accepting a wrong NVMe format, and dropping or widening the rate-0 refusal.What I ran into
None of this blocks the PR.
just affectedagainst the default build host timed out on its SSH lookup of dependency information, so I ran it with--no-box. Its gate list comes from a static walk of the files, anddocs/contrib/dgx-spark.mdis listed as unmapped to any gate.Hardware (if the change is for a machine)
A Mac with no GPU. The tests build and run only the
bloomery-placementcrate, so they are pass and fail results, not timings. The whole-crate run was on a DGX Spark (aarch64 Linux, GB10), still CPU only. No GPU gate ran.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.