interplane.Get Omega
Read in your language

gpu-head-to-head

aien-dev/gpu-head-to-head

Brought by drakestapleton

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
3Same-machine, end-to-end comparison of three inference stacks serving **Qwen3.6-35B-A3B** on one
4NVIDIA DGX Spark (GB10, sm_121): my `aien-serve-http`, vLLM, and llama.cpp. This is bar **P0** of
5the 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
13Every number here is end to end (HTTP client on the same host). Chip-only numbers from other repos
14are never mixed into these tables.
15
16## Connected repositories
17
18This 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
25The measured binary `aien-serve-http` sha256 `19173f9ec3b609fe79af644f84741d8808b92ea8eb3ecec4bc945af6f22b3aeb`
26links `libomega_gpu.a` sha256 `110295ef23dc7561eea371636347c005835f37b82c22f92401aa8a887a3ca990`
27built from omega-mv `ship/motor-l387` `6de999da` (see `results/logs/versions/BUILD.txt`). It predates
28the 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.
34Omega replacement: none yet; an Omega HTTP/SSE client is the replacement path once the Omega
35standard library has sockets and threads.
36
37## Measurement controls
38
39Before a resumed 35B run, check the external instruments with:
40
41```sh
42python3 bench/test-run-arm.py
43python3 bench/test-run-arm-lifecycle.py
44python3 bench/test-unload-gates.py
45python3 bench/test-shared-model-guard.py
46python3 bench/test-shared-window.py
47python3 bench/test-bench-python.py
48python3 bench/test-extract-admission.py
49python3 bench/test-run-arm-dra74.py
50python3 bench/test-ttft.py
51python3 bench/test-nsys-classify.py
52node bench/test-bench-node.mjs
53bash -n bench/run_arm.sh
54```
55
56Protocol amendments A8 and A9 describe owned-process cleanup, per-cell admission records, failed-stream detection and refusal to
57overwrite previous evidence. A10 adds the DRA-74 comparator arms, the TTFT rows (`prompts/ttft.jsonl`,
58generated by `bench/make_ttft_prompts.py`), comma-list cell sets and in-window sessions.
59Passing these CPU-only controls does not qualify a model or complete
60the GPU benchmark. Historical rows without an admission ledger retain their original limitations.
61
62The separate `shared-model-guard.py` checks the saved executable, arguments, working directory,
63required environment, idle health, connections, GPU inventory and the coordinator-reviewed BOARD
64checksum. Its stop mode signals a bound Linux process handle and refuses an exited handle. The
65controller must record intent and undo before stopping, hold the GPU lock and restore the same
66shared setup afterward.
67Guard controls use fixtures and harmless child processes; they never access the shared model,
68its port or GPU inventory.
69
70Session cleanup now enforces the protocol's unload gate: no GPU compute processes remain and
71available memory is no more than 2 GiB below its pre-launch baseline. Missing or malformed
72memory 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
74memory after process cleanup without flushing caches or killing unrelated processes. A failure
75requires investigation before another arm starts. Fixture tests exercise the actual cleanup
76function; 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.
79It requires a fresh output directory, the saved process snapshot, exact file hashes in a JSON
80mapping of absolute paths to SHA-256, and the checksum of BOARD after the coordinator has reviewed
81live test activity. It appends intent and undo, then refuses if the board changes before stopping.
82Required pins cover the controller, guard, launcher, snapshot, shared executable, runner and its
83helpers and prompts, plus `arms.conf` if present. Prepare frozen copies and their pins before use.
84The launcher contract is the existing 35B batch model with eight slots and context 49152; a different
85snapshot is refused before stop. The controller does not authorize a model swap.
86
87The controller holds the global lock through restoration, passes descriptor 9 to the runner, and
88closes it for the restored service. Failed or interrupted tests still attempt restoration only
89after the original and runner have exited, GPU inventory is empty and memory has recovered.
90It refuses overlapping launches and never kills a foreign process. A runner that cannot finish
91cleanup retains its inherited lock; a failed recovery gate leaves the model unrestored and records
92the reason in `window-result.json`. Such a failure requires investigation, not another launch.
93Events, runner output and restoration output remain in the fresh attempt directory.
94
95Use `python3 bench/shared-window.py --help` for required arguments. Host-only controls exercise
96sequencing and refusal paths, real fixture-child lock inheritance, and a fixture restoration
97launcher. They do not establish real GPU unloading, actual shared-model recovery, or completion of
98the larger-model comparison. Those hardware checks remain pending.
99
100## License
101
102Apache-2.0 WITH LLVM-exception, see [LICENSE](LICENSE).
103
104## Human-Directed Agentic Engineering
105
106Development follows Human-Directed Agentic Engineering (HDAE): humans define goals,
107architecture, constraints, acceptance criteria, and stopping points; agents implement,
108execute checks, diagnose failures, and revise within those boundaries. Human review
109retains responsibility for claims, acceptance, and release decisions. This describes
110the development method, not a change to runtime autonomy or historical evidence.
111
112For 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
114Human-Directed Agentic Engineering*, technical report, v1, Zenodo,
115<https://doi.org/10.5281/zenodo.23682548>.