In this article
The b12318 CUDA debug pool exposes individual scratch boundaries and disables graphs; use it for diagnosis, then recheck the normal execution mode.
llama.cpp b12318 adds a CUDA debug buffer pool with an exact-size allocation for each scratch request. The PR documents GGML_CUDA_POOL_DEBUG=1 and notes that this mode disables CUDA graphs. It is a diagnostic execution mode whose allocation boundaries differ deliberately from the ordinary pooled path.
A pool boundary can hide a logical overrun
When several logical scratch regions occupy one larger allocation, a write beyond one region may still remain inside the parent allocation. A memory checker that sees only the parent boundary can have less information about the intended region. The new debug pool gives each request its own exact-size allocation. That changes the diagnostic visibility of an access without changing what the operator was supposed to compute.
Debug mode changes the execution contract
The PR explicitly disables CUDA graphs in this mode because graph reuse could access freed storage. This is not a transparent replacement for a production timing run. Graph capture, allocation frequency and reuse behaviour differ, so performance results from debug mode should not be presented as ordinary backend throughput. The useful output is a more informative memory-access diagnosis, followed by a check in the normal execution configuration.
Keep the reproducer focused
A proposed workflow starts with the smallest backend operation and shape that triggers the suspected access, then enables the debug pool together with an appropriate sanitizer. Preserve the command, device and build revision with the report. If the failure disappears, consider whether changed allocation timing or disabled graphs removed a necessary condition rather than declaring the original issue disproved. Diagnostic instrumentation can alter the execution being observed.
A clean checker run has a bounded meaning
Passing the instrumented test supports the memory behaviour exercised by that test under that mode. It does not prove correctness of all kernels or validate graph replay, which is disabled here. Compare numerical output separately and retain a normal-mode integration test. The release adds a useful debugging tool; it does not automatically repair every allocation bug, nor does this article claim a newly discovered defect from running it.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.