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/aienux/blob/main/native/kernel/tools/ck_gpu_bench.c # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. 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 `aienux / native / kernel / tools / ck_gpu_bench.c` 424 lines ยท 18855 bytes Raw Blame History 1 /* ck_gpu_bench.c -- Spark-side GPU bench console tool (LAB BUILD: CK_X86_REPORT=1 kernel). 2 * 3 * Usage: ck_gpu_bench [--key FILE] [--target IP] [--serial PATH] [--transcript FILE] 4 * ck_gpu_bench ping [same options] 5 * 6 * Transports: 7 * default (UDP): datagrams to the iMac, port 47035. This is the hardware path. The kernel side 8 * uses tg3 RX/TX, which is compiled in the lab build but is NOT tested in this repo. 9 * --serial PATH: a unix socket to the kernel's COM1 (QEMU: -serial unix:PATH,server=on,wait=on). 10 * The test build (CK_X86_BENCH_TEST=1) answers the same packets as text lines: 11 * request "ABCHREQ " + 128 hex digits 12 * reply "ABCHRESP " + 128 hex digits 13 * The tool waits for "bench: GPU bench console ready" before it sends. 14 * 15 * Script lines (one command per line, # comments, numbers decimal or 0x hex): 16 * ping 17 * pci_cfg bar5_read bar5_write 18 * bar0_read bar0_write 19 * bar5_poll 20 * bar5_rmw 21 * badauth the same command with one HMAC byte flipped (kernel must answer ERR_AUTH) 22 * stale the same command with counter 1 (not above the kernel's last: ERR_AUTH) 23 * replay the previous request again, byte for byte (same counter: ERR_AUTH) 24 * 25 * Counter: starts from the clock (seconds * 1000) so a second run is still above the kernel's 26 * last counter. A status of ERR_ALLONES stops the script (device gone); the tool sends nothing after it. 27 * 28 * Output: one line per transaction, "