engine: RAMMAP, NUMA, and telemetry (PR1 of #377 split) - #820
Conversation
4dbacf5 to
ea46a57
Compare
|
@JustVugg, this PR is ready for review. The current CI workflow and check workflow are both |
ea46a57 to
6dde621
Compare
|
@JustVugg can you approve the workflow? |
|
Done 👍🏻👍🏻 |
|
@BColsey — this has been open a while and you've done a lot of careful work on it, so rather than leaving it in the queue I went and did the verification myself. Two of the things that were making me cautious turned out to be non-issues, and I'd rather tell you that than have you guess at what was blocking it. What I checked1. The strict PROF parsing — safe. My concern was that rejecting anything other than 10/17/18 fields would break engines, because we have direct evidence this week that the five engines implement the shared telemetry surface inconsistently (#890 was V4 emitting incomplete phase telemetry; a review of MiniMax found it emitting a 5-field So I counted what each engine actually emits on All five are exactly 10, and the current parser accepts 2. It's opt-in — confirmed. Why it satHonestly: not because anything was wrong with it. The work itself is visibly disciplined: reconstructed file-by-file from a frozen green donor, The one thing I'd like before mergingA token-exactness check with the feature off, on a tiny model: same prompt, greedy,
That is the whole ask. Not another split, not a rewrite. On the chainYour own PR body says PR1 is the root with no dependency, and I'll treat it that way: merging this does not commit the project to #821 or #822. They get judged on their own terms, and they're much bigger, so they'll take longer. I don't want that to hold this one hostage. One question so I can sequence properly rather than leave you guessing: is the RAM-map tier usable today without #821, if a user mounts a tmpfs and populates it themselves? If yes, this lands as a complete, self-contained capability and #821 becomes the convenience layer — which is a much easier thing for me to merge and for users to understand. Thanks for the persistence on this one, and for splitting #377 when I asked. Give me the exactness check and I'll take it. |
|
@JustVugg thanks for verifying the PROF question yourself instead of just asking me, and for saying outright what had been holding it up. Here's the exactness check, run the way you described it. Token exactness with the feature off I built dev ( Both binaries emit: I ran each side twice; all four runs came out identical. The only lines in the full stdout that differ between the two binaries are timing measurements (RSS, tok/s, PROFILE timings), which vary from run to run on the same binary anyway. Worth knowing in case you try it yourself: in serve mode the output does change with the flags unset — PROF grows a few fields, there are new GPUS/GPUDETAIL lines, TTFT appears in the run summary. That's the telemetry this PR adds; the token-bearing output is what's byte-identical. It's already implied by CI, since you offered that as an out: the "Efficiency suite (tiny oracle)" job runs this PR's binary with none of the gates set, against the same seed-1234 fixture. Both dev @ One thing I'd rather point out than have you find: the colibri oracle score is print-only. The binary returns 0 regardless of the match count, identically on dev — the 32/32 lives in the logs, not the exit code. Inkling gates it properly ( Your tmpfs question: yes, it works without #821 Everything the tier needs is in this PR. By hand:
So this PR is usable on its own, and #821 is the convenience layer. #821 changes nothing in the engine's C sources or the serve protocol — it does touch The real gap is docs: that recipe currently exists only in the Separately, dev has moved about 110 commits since my last forward-merge. The merge-tree dry-run against today's tip comes out clean, so once you've had a look at this I'll forward-merge and push. That way the head you merge includes current dev. That push will need the usual workflow approval click. |
Forward-merge of dev (1658b1f..1cc0be2, 123 commits) ahead of review; reconstruct history preserved. Textual conflict (c/openai_server.py Engine.__init__): union of the branch's spawn-refactor params with dev's family-registry param — family stays the 7th positional (dev's serve() calls it positionally), command_prefix/stderr trail as keyword-only additions. Semantic conflicts beyond the textual merge: - Engine(env) child env gains dev's V4_MTP_GPU default (b7117bf); branch's spawn-hook test expectation updated to match. - test_cpu_vs_cpu_determinism tok/s tolerance flakes under local suite load (46% drift, identical hit rates, green 3x in isolation, untouched by both sides since the merge base) — left as-is for CI.
|
@JustVugg — dev moved again overnight (~35 commits through The new head needs the usual workflow approval click whenever you have a moment. Once CI is green this is ready from my side. |
|
Workflow approved — both runs are live on |
Resolve overlapping CUDA accounting, engine telemetry, echo protocol, and dispatcher test changes for PR JustVugg#820.
|
@JustVugg — the merge conflicts are resolved and current dev is forward-merged at 6c99dcc. Both new workflow runs are action_required with no jobs, so they need the usual approval click: CI and check. Local validation completed: full C tests passed and all 172 OpenAI server tests passed; the broader Python run had only the previously documented scheduler-sensitive tok/s timing wobble. Once approved, CI can run. |
Forward-merge upstream/dev at 6896e5f into PR JustVugg#820.\n\nResolve c/colibri.c by preserving PR JustVugg#820's weights_dir/RAMMAP path around upstream's KV_TQ safety guards. Resolve c/openai_server.py by retaining the shared termination helper and applying upstream's best-effort second reap wait there.
Resolve PR JustVugg#820's runtime and launcher conflicts while preserving RAMMAP-first residency, indexed pin/LRU publication, and measured-cap startup semantics. Keep PILOT reservations mutex-published, io_uring telemetry descriptor-aware, and prefetch/victim bookkeeping race-free. Add deterministic regression coverage for RAMMAP, cache indexes, and PILOT handoff.
Resolve the follow-up GLM segment-loader and OpenAI server test conflicts introduced after upstream dev advanced. Preserve the separate staged weights namespace across the range-based loader while retaining upstream Segment adapter registration and tool-call parsing coverage.
|
@JustVugg can you please approve the workflow |
Resolve the follow-up Windows launcher conflicts after upstream dev advanced. Preserve stream-specific Windows binary mode and staged weights/state initialization while retaining the shared console guidance and release launcher.
Resolve the v1.9.0 telemetry conflict while preserving RAMMAP, CUDA, and Vulkan residency accounting. Account for Vulkan overlap by expert identity so host and RAMMAP tiers remain exclusive.
Bring PR 820 through upstream dev commit 2a12e44, including the GLM-5.3 release-build contract.
Forward-merge upstream/dev at b690bfb into PR JustVugg#820. Preserve PR JustVugg#820 staged weights namespace and protected engine startup path while retaining upstream model lifetime, planned-cap cleanup, Qwen 3.8, and GLM-5.3 no-think fixes.
Draft successor — supersedes #377. One of three dependent PRs reconstructed file-by-file from the frozen green donor
5f6f31a(onto base72ddb673). Do not merge #377; it is closed as superseded once all three are open + linked.docs/superpowers/specs/2026-08-01-pr-377-stabilization-design.md(PR1, L76-80)docs/superpowers/specs/2026-08-02-pr-377-successor-reconstruction.mdScope
Engine C RAMMAP/NUMA + CUDA accounting, strict telemetry parsing, and their tests/docs. Excludes planning, mounts, lifecycle, benchmark, UI.
c/{colibri.c, backend_cuda.cu, compat.h, st.h, telemetry.h},c/Makefile,c/resource_plan.pyc/openai_server.py(PROF parsing)test_rammap.c,test_resource_masks.c,test_uring.c,test_serve_sentinel.c,test_backend_cuda.cu,test_rammap_e2e.py(parse logic),test_openai_server.py,test_openai_tools_e2e.py,test_fp8_e2e_repack_load.py,test_resource_plan.pydocs/serve_protocol.md,docs/cuda.mdReconstruction work
physical_ssd_validas== "1"(donor usesbool(int(...))); reject non-finite numerics; a malformed known-kind record is a protocol error.docs/serve_protocol.mdnormative at the PROF contract.c/Makefile(test targets here; install rules → PR2) andtest_rammap_e2e.py(parse logic here; live tmpfs cells → PR3).Dependency
None — PR1 is the root.
openai_server.pyis stdlib-only; C tests compile against PR1 headers only.Build verification (subagent worktree)
make -C c checkGREEN end-to-end: C build + 41 test binaries, C suite ALL PASS (0 failures), Python discovery 302 passed / 0 failed / 18 expected skips. Standalone — no PR2/PR3 dependency.Reconstruction update
PR1 reconstruction landed (commit f56604f): PROF telemetry strictened to exactly 10/17/18 fields +
physical_ssd_valid == "1"+ finiteness checks;docs/serve_protocol.mdmade normative; +4 tests. Green: 282 passed / 0 failed. Still TODO: hunk-split Makefile/test_rammap_e2e (organizational).Update — 2026-08-07: forward-merged
upstream/dev(forward-only merge commit; reconstruct history preserved). Conflicts resolved against the green donor3658a5d; branch rebuilt and tested linux-green (make -C c checkexit 0, 403 tests OK; conflicts inc/Makefile,c/openai_server.py,c/st.h,c/telemetry.h). Merged dev @aa46e7b; GitHub reports this branch MERGEABLE intodev(dev has since advanced to8d06bd1, but this branch's engine-only changes don't overlap the newer commits, so it stays conflict-free).Update — 2026-08-17: forward-merged
upstream/dev@1cc0be2(forward-only merge commitc9767cc; reconstruct history preserved). 123 dev commits integrated. One textual conflict (c/openai_server.pyEngine.__init__) resolved as a union: dev'sfamilykeeps the 7th positional slot (dev'sserve()calls it positionally), the branch'scommand_prefix/stderrtrail as keyword-only additions. Two semantic conflicts fixed past the textual merge: the branch's spawn-hook test expectation now includes dev's newV4_MTP_GPUchild-env default (b7117bf), andtest_cpu_vs_cpu_determinism's tok/s tolerance is a known local-load flake (identical hit rates, green 3x isolated, file untouched since the merge base) — CI is the gate there.make -C c check: C suite green; 568 python tests, 1 local timing flake, 29 expected skips. GitHub reports this branch MERGEABLE (CLEAN) intodev.Update — 2026-08-17 (later): dev advanced again (
1cc0be2→c945cd5, cluster expert workers + expert-store registry + qrow hoist); forward-merged as3ca0be8(forward-only). One textual conflict (c/colibri.cmain): union of dev'sCLUSTER_WORKERSinit block with the branch'sweights_dirmodel_initsignature +rammap_build()call. Validation:make -C c checkfully green (574 tests, 0 failures — including the earlier local-only tok/s flake), and the greedy token-exactness A/B re-run on this merge (merged binary vs devc945cd5, shared seed-1234 fixture, gates unset): byte-identical token streams, 20/20 both sides. MERGEABLE (CI pending approval as usual for fork pushes).