Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/gpu-head-to-head/blob/main/README.md # gpu-head-to-head aien-dev/gpu-head-to-head Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `gpu-head-to-head / README.md` 115 lines ยท 6943 bytes Raw Blame History Rendered 1 # gpu-head-to-head 2 3 Same-machine, end-to-end comparison of three inference stacks serving **Qwen3.6-35B-A3B** on one 4 NVIDIA DGX Spark (GB10, sm_121): my `aien-serve-http`, vLLM, and llama.cpp. This is bar **P0** of 5 the GPU-stack plan: prove the numbers before claiming them, and publish them even when I lose. 6 7 - Protocol (predeclared, committed before the first run): [PROTOCOL.md](PROTOCOL.md) 8 - Results table: planned at `results/RESULTS.md`, not present in this tree. 9 - Cold-start study (separate, chip-level, amendment A7): [coldstart/PROTOCOL.md](coldstart/PROTOCOL.md), results in `results/coldstart/` 10 - Raw request rows, server logs, memory samples, versions: [results/](results/) 11 - Client and scripts: [bench/](bench/) 12 13 Every number here is end to end (HTTP client on the same host). Chip-only numbers from other repos 14 are never mixed into these tables. 15 16 ## Connected repositories 17 18 This repo is a child of the GPU stack. It pins its parents by sha: 19 20 | Parent | Pinned sha | Role here | 21 |--------|-----------|-----------| 22 | [aien-dev/CUDApp](https://github.com/aien-dev/CUDApp) | ``780a0af1f08c1786ea53a4e8702ca8bb1396fdbb`` (main, 2026-10-27) | GPU stack source of truth (CUDA++) | 23 | [aien-dev/aien-sovereign-core-mv](https://github.com/aien-dev/aien-sovereign-core-mv) (was `aien-sovereign-core`) | ``f0230a59eec985c3290ac78c0cc04322bacf9f0a`` | source of the measured `aien-serve-http` binary `bin-`19173f9e`` | 24 25 The measured binary `aien-serve-http` sha256 ``19173f9ec3b609fe79af644f84741d8808b92ea8eb3ecec4bc945af6f22b3aeb`` 26 links `libomega_gpu.a` sha256 ``110295ef23dc7561eea371636347c005835f37b82c22f92401aa8a887a3ca990`` 27 built from omega-mv `ship/motor-l387` ``6de999da`` (see `results/logs/versions/BUILD.txt`). It predates 28 the CUDApp cutover; the CUDApp pin records the GPU-stack state at the time of the measurement. 29 30 ## Host tools 31 32 `bench/*.py` are host measurement tools (Python 3 stdlib; `make_prompts.py` and `agree.py` also use 33 `tokenizers` from inside the pinned vLLM container). They are not product code and ship nothing. 34 Omega replacement: none yet; an Omega HTTP/SSE client is the replacement path once the Omega 35 standard library has sockets and threads. 36 37 ## Measurement controls 38 39 Before a resumed 35B run, check the external instruments with: 40 41 ```sh 42 python3 bench/test-run-arm.py 43 python3 bench/test-run-arm-lifecycle.py 44 python3 bench/test-unload-gates.py 45 python3 bench/test-shared-model-guard.py 46 python3 bench/test-shared-window.py 47 python3 bench/test-bench-python.py 48 python3 bench/test-extract-admission.py 49 python3 bench/test-run-arm-dra74.py 50 python3 bench/test-ttft.py 51 python3 bench/test-nsys-classify.py 52 node bench/test-bench-node.mjs 53 bash -n bench/run_arm.sh 54 ``` 55 56 Protocol amendments A8 and A9 describe owned-process cleanup, per-cell admission records, failed-stream detection and refusal to 57 overwrite previous evidence. A10 adds the DRA-74 comparator arms, the TTFT rows (`prompts/ttft.jsonl`, 58 generated by `bench/make_ttft_prompts.py`), comma-list cell sets and in-window sessions. 59 Passing these CPU-only controls does not qualify a model or complete 60 the GPU benchmark. Historical rows without an admission ledger retain their original limitations. 61 62 The separate `shared-model-guard.py` checks the saved executable, arguments, working directory, 63 required environment, idle health, connections, GPU inventory and the coordinator-reviewed BOARD 64 checksum. Its stop mode signals a bound Linux process handle and refuses an exited handle. The 65 controller must record intent and undo before stopping, hold the GPU lock and restore the same 66 shared setup afterward. 67 Guard controls use fixtures and harmless child processes; they never access the shared model, 68 its port or GPU inventory. 69 70 Session cleanup now enforces the protocol's unload gate: no GPU compute processes remain and 71 available memory is no more than 2 GiB below its pre-launch baseline. Missing or malformed 72 memory readings and failed GPU queries also fail the session and remove its DONE marker. 73 `unload-status.txt` records both checks; more available memory is acceptable. The check observes 74 memory after process cleanup without flushing caches or killing unrelated processes. A failure 75 requires investigation before another arm starts. Fixture tests exercise the actual cleanup 76 function; real-model unload and shared-service restoration still require hardware evidence. 77 78 `bench/shared-window.py` integrates the guard, one arm session and same-configuration restoration. 79 It requires a fresh output directory, the saved process snapshot, exact file hashes in a JSON 80 mapping of absolute paths to SHA-256, and the checksum of BOARD after the coordinator has reviewed 81 live test activity. It appends intent and undo, then refuses if the board changes before stopping. 82 Required pins cover the controller, guard, launcher, snapshot, shared executable, runner and its 83 helpers and prompts, plus `arms.conf` if present. Prepare frozen copies and their pins before use. 84 The launcher contract is the existing 35B batch model with eight slots and context 49152; a different 85 snapshot is refused before stop. The controller does not authorize a model swap. 86 87 The controller holds the global lock through restoration, passes descriptor 9 to the runner, and 88 closes it for the restored service. Failed or interrupted tests still attempt restoration only 89 after the original and runner have exited, GPU inventory is empty and memory has recovered. 90 It refuses overlapping launches and never kills a foreign process. A runner that cannot finish 91 cleanup retains its inherited lock; a failed recovery gate leaves the model unrestored and records 92 the reason in `window-result.json`. Such a failure requires investigation, not another launch. 93 Events, runner output and restoration output remain in the fresh attempt directory. 94 95 Use `python3 bench/shared-window.py --help` for required arguments. Host-only controls exercise 96 sequencing and refusal paths, real fixture-child lock inheritance, and a fixture restoration 97 launcher. They do not establish real GPU unloading, actual shared-model recovery, or completion of 98 the larger-model comparison. Those hardware checks remain pending. 99 100 ## License 101 102 Apache-2.0 WITH LLVM-exception, see [LICENSE](LICENSE). 103 104 ## Human-Directed Agentic Engineering 105 106 Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, 107 architecture, constraints, acceptance criteria, and stopping points; agents implement, 108 execute checks, diagnose failures, and revise within those boundaries. Human review 109 retains responsibility for claims, acceptance, and release decisions. This describes 110 the development method, not a change to runtime autonomy or historical evidence. 111 112 For the documented method and a systems-software case study, see Gregory M. Kurtzer 113 (2026), *Ginux: Building an Independent Kernel That Runs Linux Userspace through 114 Human-Directed Agentic Engineering*, technical report, v1, Zenodo, 115 .