Files
leleka/crates
Pavlo RatushnyiandClaude Sonnet 5.5 b5d5b24faa decode: a verifier graph that runs out of device memory costs the widest windows, not the engine
cuGraphInstantiateWithFlags answering out of memory used to poison the whole CUDA context (every call after it failed, so the engine was lost; upstream a8c1d4b7 / 2a9a67c1). The refusal is not sticky and changes no state, so now:
- the instantiate step does not poison the context on that one code (every other failure still does), the half-built graph is destroyed, and a line is logged;
- a failed cuGraphUpload (a warm-up) is skipped with a line;
- OriginalVerifier::record_all names the graph that did not fit (Error::GraphOutOfMemory { window }, 0 = commit graph);
- the serve stack repeats the assembly with the windows that fit (assemble_with_window_fallback; owners come back from each failure), logs each step, and narrows the settings, controllers and MTP draft cap of every arm to the window it ended with, for the later requests too. No cap below T=2: a failure with nothing left is returned as before, but with the context intact.
Test hook for a card with room: LELEKA_TEST_WINDOW_INSTANTIATE_OOM_AT=N fails the N-th window instantiation once.

CPU tests: poison decision, error classification, cap computation, retry loop (terminates, stops at the floor, no retry on other errors), settings cap. Not verified on a GPU.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 03:33:18 +01:00
..