Repository navigation
gpu: carry the host reading in a tier node's census - #946
juliankang4 merged 1 commit into
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: the census carries the reading, the wire read and write match, an unknown tag and an old version are refused by name, and no failure path survived.
Non-blocking
⚠ The room prefix covers every planner error: crates/gpu/src/host/node.rs:372. expert_nvme_tier also fails for reasons that are not room (room.rs:801 "a host segment of a routed stack with no list", room.rs:825 "host experts … are not the other stacks'"). Those now read "the node's host room N B (…): …", which points at room when room is not the cause. Direction: keep it, or apply the prefix only to the room refusals if the planner gains a typed room error. No change is needed to merge.
⚠ A constant in a printed line: crates/gpu/src/host/tier_cpu/tests.rs:209. zero-room-refused=true is now a literal, because the refusal is asserted in the loop above. Nothing reads the field (Grep: one hit). Drop the field from the println!.
Checked
- Duplicates: 6 new items checked (
HostReadtag map,NodeCensus::readandwritearms, the new test, the refusal text). None duplicated.HostRead::word()is a text form for record lines, not a wire tag, so it is not a second owner. dryer: 0 pairs. - Complexity:
NodeCensus::read21 → 29 andwrite4 → 9 are even growth (one match arm per reading).node_nvme_host_run26 → 27 is a test loop. Harmless. - Silent failure: 3 sites followed. Unknown tag returns
Err("unknown host reading N"). A truncated cgroup path fails ini.str. A version 5 payload fails at the version check, before the new byte is read. - Tests:
a_census_keeps_its_host_readingprotects the tag map inwriteandread. Mutant: swap two tags in only one of the two matches. The round trip turns red. Mutant: drop the path from the cgroup arm. The round trip and the truncation loop turn red. Mutant: leaveVERSIONat 5. The version-5 case no longer fails by version, and its assert turns red.node_nvme_host_runprotects the prefix inproject. Mutant: drop the reading from the message. Thecontainsassert turns red for each of the 5 readings. - Gates: no pins moved. Escape catalog: no pattern matched (no shell code in the diff).
- Hot path: none (load time, wire census).
Notes
- The PR body names a "DGX Spark (GB10)" but has no
nvidia-smiline, and it names only the head hash and the upstream hash.gpu.jsonrecordsevidence: false. The change is a wire and message change, so this does not affect the verdict.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/generate.rs, crates/gpu/src/host/node.rs, crates/gpu/src/host/node/wire.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 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. |
두 번째 노드가 보낸 호스트 메모리 여유 값에 그 값을 읽은 방법도 함께 실어, 노드 쪽 배치가 거절될 때 원인을 알 수 있게 고치는 수정입니다.
Part of #565.
What and why
A tier node reports its available host bytes (its host room) in the census it sends when node 0 connects. The census carried only the number. When the node's plan was refused for lack of room, the error gave no hint whether that number came from
BLOOMERY_HOST_ROOM,MemAvailable, a cgroup limit or the machine's memory statistics.The census now carries the reading next to the bytes:
NodeCensus::host_roomis a(u64, HostRead)pair, the same shapeworkstation::host_available_read()already returns. A refusal from the node's plan readsthe node's host room <N> B (<reading>): ..., followed by the planner's own message. The reading goes on the wire as one tag byte after the room (a cgroup reading also carries its path), and an unknown tag is refused by name. The census layout changed, so the node protocol version goes from 5 to 6; a node on the old version is refused by the existing version check, which names it. The planner's arithmetic and the bytes it uses are unchanged.docs/contrib/dgx-spark.mdnow says the census carries the reading.Release notes: Fixed: a two-node tier refusal for lack of host room on the second node names that node's room and where the number was read from.
Code shape
HostReadandhost_available_read()from the placement code instead of a second type for the wire.cargo fmt --all -- --checkis clean.Duplication found or removed (
path:line): none.What I ran
Tested head
bf18cd5a2eac1e7ee23d860c86d8a5b11d2cb4e5on upstream main248ed061df390aae21cf9fe0cdb29d0ff884d7ca, on a DGX Spark (GB10):test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 447 filtered out; finished in 0.15s.test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 211 filtered out; finished in 0.01s, exit code 0.The new test
a_census_keeps_its_host_readingwrites and reads a census for every reading kind, refuses a payload cut at any byte, refuses tag 255 asunknown host reading 255, and refuses a version 5 payload.node_nvme_host_budget_keeps_the_os_reservenow checks that a node with no room refuses with its room and each of the five readings in the message.On the same head, the GPU library gate on a DGX Spark (GB10):
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 440 filtered out, includinghw_held_node_nvme_host_run_keeps_eager_and_captured_rows.test result: ok. 1 passed; 0 failed.No timed measurement was taken; the change touches the census wire format and an error message, not device computation.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.