Repository navigation
build: the CPU server graph gives the server module core, as the Metal, CUDA and fuzz graphs do - #2363
Merged
Conversation
Owner
|
Thanks @Whq02, that's a real break on main, and the fix is the right shape: the plain graph now builds |
…l, CUDA and fuzz graphs do Since 0a83dd5 the Living Weights view reads a shard's header with core (zig/src/server/slide_model.zig), and that commit gave the core module to the three graphs that root zig/src/server/root.zig: the Metal build's server tests, the CUDA host tests and fuzz-cortheon. The fourth, plain in zig/build/server.zig, builds the fake server's module for zig build server-cpu without it, so the step fails at slide_model.zig:4 with no module named 'core' available within module 'server'. plain now carries core/root.zig over its own tokenizer, as the Metal graph's server tests do, and cpuArtefacts takes it from the import table as it takes engine_api, tokenizer and template, so the engine-less CLI and the fake server share one core.
ashhart
force-pushed
the
mercury/server-cpu-build
branch
from
November 6, 2026 13:20
2b92ced to
012ec0d
Compare
Owner
|
Thank you @Whq02. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
8 tasks done
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.
What this changes
zig build server-cpu(the CPU-only fake server and the engine-less CLI thatzig/tests/server/build.shinstalls) doesnot compile on main at 53311e7:
Since 0a83dd5,
slide_model.zigimportscore, and that commit gave thecoremodule to three of the four buildgraphs that root
zig/src/server/root.zig: the Metal build's server tests (zig/build/metal_targets.zig), the CUDAhost tests (
zig/build/cuda.zig) andfuzz-cortheon(zig/build/cortheon_fuzz.zig). The fourth,plaininzig/build/server.zig, builds the fake server'sservermodule forserver-cpuand was left without it, sofake_serveno longer compiles; the engine-less CLI beside it rootsmain.zigdirectly with its owncoreandstill builds.
After this change
plaincarriescore/root.zigover its owntokenizermodule, the shapemetal_targets.ziggivesthe server tests, and
cpuArtefactstakescorefrom the import table as it already takesengine_api,tokenizerand
template, so the fake server and the engine-less CLI share onecoreinstead of the CLI's separate one. Onefile, 3 insertions, 1 deletion.
Reproduced with Zig 0.17.0 on macOS arm64, without the Metal toolchain;
server-cpuneeds no Metal compilation.atc overlap --json: ranatc overlap --json --base origin/mainwith ATC 0.9.0 at 2026-11-06T12:36:02Z on this head againstorigin/mainat 53311e7; exit 0.changedFiles1; 17 overlaps, each sharingzig/build/server.zig: server: an explicit thinking off that a template can't honour is refused #2170, Tests: pins for the documented limits, defaults and flag dependencies, a replay of the prompt cache's eviction, and a timing of its index #2305, lanes: one fixed code for every wait and refusal (#2135) #2196, /v1/models: each model lists what it supports, from the same facts the refusals read #2157 and metrics: an opt-in histogram of how long a request queued #2158clean; EXL3 Flash Next on CUDA: one rank, offloaded experts, sm_120 gate (1/8) #1441, EXL3 Flash Next: expert-parallel TP=2 (same tokens as TP=1) and MTP drafts (2/8) #1442, EXL3 Flash Next: deep prefill (3/8) #1443, EXL3 Flash Next: KV pages from the core pool (4/8) #1444 and EXL3 Flash Next: host-resident K/V on the tier (6/8) #1522conflicts; Unlimited-OCR-2 on native Metal: the publisher's BF16 release, page images to structured text #2074, Server: tool calls completed just before the thinking close are returned when no answer follows (#2310) #2313, EXL3 Flash Next: draft lane guard for offloaded experts (8/8) #1446, EXL3 Flash Next: CUDA graphs and the device planner (7/8) #1445, Metal: serve the dense Qwen3.8-27B straight from a GGUF file (Q4_K_M, Q8_0) (#1920) #2078, Unlimited-OCR-2 on CUDA: the family's steps on NVIDIA GPUs, the router's long-context speedup (stacked on #2074) #2077 and TensorFold Web: a small local web app, andtensorfold webto open it #1781unknown. No local worktree overlaps.git merge-tree --write-tree origin/main <their head>mergesserver.zigcleanly for every one, although it finds conflicts in other files. Against this head, every one adds the same direct conflict incpuArtefacts: this change readscorefromserver_mod.import_table, while their patch keeps the separatecorecreation and addsserver_mod.addImport("core", core). Those five overlaps are between two fixes for the same missing import, not inheritedserver.zigconflicts with main.corecreation/import inplainandconst core = server_mod.import_table.get("core").?;incpuArtefacts; omit their separatecorecreation and redundantserver_mod.addImport("core", core). Applying that single-hunk choice to each merge result gives exactly this tested head'sserver.zig. This is the resolution to coordinate before combining, not a claim that their branches have been updated or a combined tree tested; no source change was made here for it.complete: false(otherPullRequestsLimit,pullFilesLimit): there are 214 open PRs, more than the 200 the check reads, and it reports partial file-list coverage. The overlaps above are the ones it reached; the sevenunknownresults and omitted coverage are not cleared by exit 0.Checks on this head
python3 tools/zig/lean_check.py, on the base and on this head: both exit 1 with5616 files, 252 problems, using the identical checker. The 252 findings are inherited;python3 tools/zig/lean_new.py BASE.txt HEAD.txtexits 0 withlean: 252 problems, 252 on the base, 0 new.zig build server-cpuexits 1 on 53311e7 with the error above, 4/7 successful steps and 1 failed compile.zig build server-cpu --summary allexits 0 on this head, 7/7 steps, 0 failures. No new test file: these commands directly exercise the affected build graph.zig build test-golden --summary all: exit 0, 5/5 steps; 322/335 and 55/55 equal to the server goldens, 13 known differences, 0 unexpected differences, 0 skipped cases. It builds its ownfake_servefrom the macOS server-tests module, notplain, so this is the tree's golden gate rather than the regression check for this change.zig fmt --check build.zig zig: exit 0, no files reported.git diff --checkandgit diff --check origin/main..HEAD: exit 0, no whitespace errors.zig-out/server/fake_serve serve zig/tests/server/fixtures --port 0selected free port 59858.GET /healthreturned 200 (curlexit 0,status: "ok",model: "fixtures"); SIGTERM drained and stopped the server with exit 0. Three assertions passed: health, fixture identity and graceful stop; 0 failures, 0 skips.zig-out/server/tensorfold-native --version: exit 0,tensorfold-native 1.2.3.zig build testandzig build nativeon macOS compile Metal shaders; no Metal compiler is available (xcrun -f metalexits 72).zig build test-grammar-tools -Dxgrammar=DIR, which buildstool_grammar_xgrammar_testthrough the other call toplain, needs an xgrammar checkout, which was not supplied; it gains the samecoreimport but was not exercised.zig build grammar -Dxgrammar=DIRwas not run either, and the golden and health runs warned thatlibtfgrammar.dylibis absent. No Linux or Windows build was run. ATC's direct overlaps and incomplete coverage are recorded above; no combined EXL3-series tree was built.Receipt
n/a: this changes module wiring for the fake server, the engine-less CLI and the grammar tool tests, not an inference
engine or kernel. The built CPU server's
/healthand SIGTERM checks above exercise the changed graph's artifact;no checkpoint, token-exactness or performance result is claimed.
Checklist