CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
CUDApp / evidence / C5-ISOLATION / README.md
| 1 | # C5: two processes, and a never-ending kernel (docs/OMEGA.md row C5) |
| 2 | |
| 3 | Row C5: two processes on one GPU are both correct, or the second gets a named refusal and the first is unharmed. A |
| 4 | never-ending kernel times out, then a correct launch succeeds in the same process. |
| 5 | |
| 6 | What this branch adds (on c4/streams): |
| 7 | - `omega_gpu_session_recover()`: the way back from a latch without restarting the process. Runs the on-close hooks |
| 8 | (still latched, so nothing is released while the old grid may run), closes the device (Linux reference: the RM client |
| 9 | close destroys this process's channels and the grid on them, then frees and unmaps every buffer), and only then lifts |
| 10 | the latch and clears the parked list. The next open is a new device. `omega_gpu_session_recoveries()` counts them; |
| 11 | a command list latched before the latest recovery no longer blocks. |
| 12 | - The Linux platform close now reports a driver teardown fault (it used to drop it): recover then stays latched for good |
| 13 | (the old grid may still run; the process must exit) instead of claiming success. |
| 14 | - Fake-platform cases TIMEOUT_RECOVER_SAME_PROCESS, RECOVER_TEARDOWN_FAULT_STAYS_LATCHED and four new session mutants |
| 15 | (recover keeps the latch, recover |
| 16 | without the close, recover when not latched, recover ignores a teardown fault): each one is caught. |
| 17 | - `tests/gpu_isolation_test.c`: the chip test (hang + recover; two processes; a hang beside a working process). |
| 18 | |
| 19 | Driver docs: the vendored NVIDIA headers document NVA06C_CTRL_CMD_PREEMPT ("This command preempts a channel group") but |
| 20 | are silent on freeing a channel group whose grid never ends (RM source not vendored). The chip run is the proof. |
| 21 | |
| 22 | |
| 23 | Review fixes (independent Opus review, 2026-10-22): |
| 24 | - The never-ending launch now passes one argument word (a launch with none is refused before submit, so the hang part |
| 25 | would never have hung). |
| 26 | - The two processes are started together after both are set up and each runs at least 3 s; their time spans must |
| 27 | overlap by at least half of that. Beside a hang, process 1 starts at process 2's "hang launched" signal and keeps |
| 28 | going until process 2 is done; it must have launches inside that stretch. |
| 29 | - "Grid destroyed" is not claimed from timings: it rests on the driver's clean close (a teardown fault keeps the |
| 30 | session latched, case RECOVER_TEARDOWN_FAULT_STAYS_LATCHED). |
| 31 | - A command list made before a recovery is refused (its buffers are gone); the chip test checks it. |
| 32 | - A command-list-only latch (check launch completed) is recoverable: omega_gpu_session_note_module_latch, case |
| 33 | RECOVER_MODULE_LATCH, mutant recover-ignores-module-latch. Session tests 16/16, mutants 11/11. |
| 34 | - C4 parts fixed here too (so merge c5/isolation, which contains c4/streams): a launch that waits always gets the full |
| 35 | WAIT_FOR_IDLE + invalidate; a list with waits runs only in submit_pair with the list it waits on. |
| 36 | |
| 37 | | file | what | result | |
| 38 | | --- | --- | --- | |
| 39 | | 01-host-only.log | codegen + encode of the work, mutant and never-ending kernels; simulator exact, mutant caught | PASS (5 checks), 2026-10-24T23:29Z on the train tip | |
| 40 | | 02-session-platform.log | the session on a fake GPU, both recover cases included | PASS 16/16, 2026-10-24T23:29Z on the train tip | |
| 41 | | 03-session-mutants.log | 11 broken copies of the session, each caught | 11/11 killed, 2026-10-24T23:29Z on the train tip | |
| 42 | | 05-platform-linux.log | the Linux platform on a simulated driver | 7/8 on the train tip (2026-10-24T23:29Z): the one failure, CMDLIST_NEAR_CAP_SUBMITS_WITH_L2_INVAL_PENDING, is main's own regression from omega-mv #712 (OMEGA_GPU_CMDLIST_MAX_LAUNCHES 2048 -> 4096; the test hard-codes 2 submissions, 4096 launches take 4). Plain main 9a8a0fe2 fails it the same way; the old head 5cb252994 passed 8/8. Fixer lane L823 (ledger) fixes the test on main. Nothing in this layer changes that case. | |
| 43 | | 04-never-ending-kernel.sass.txt | our disassembler: `IADD3; BRA 0x20` (branch back for ever) | as designed | |
| 44 | | 03-chip-values-20261022-f792cd1d.log | chip, values only, 2026-10-22 07:06Z on `c5/isolation` f792cd1d: header only (date, head, binary sha256, command). The worker died at 07:06Z before the test printed a line. NO RESULT. | NO RESULT | |
| 45 | | (chip, pending slot) | hang + recover + right values; two processes right; hang beside a working process, on the train tip (the never-ending-kernel run touches the live server's GPU: 1-second-spin precursor first, then only with Drake's or the server owner's OK) | NOT RUN | |
| 46 | |
| 47 | Chip command (GB10 lock): `build/gpu_isolation_test`. Safety note for the slot: the never-ending kernel is one warp; |
| 48 | its teardown is the RM channel free, which must preempt it; this is the first chip run of that path. |