llama.cpp b9974 fixes CUDA out-of-memory crash on query
GPU crashes when out of memory no more, thanks to new error handling
llama.cpp, the popular open‑source C++ implementation for running LLMs locally, has dropped release b9974. The headline fix addresses a nasty CUDA bug: when a GPU device has no available memory, the call to cudaMemGetInfo() itself would trigger a fatal out‑of‑memory crash — even if the user wasn’t trying to use that device for inference. This issue occurred at startup when llama.cpp queried all CUDA devices, and was especially problematic for users with multiple GPUs or limited VRAM. The patch makes the error non‑fatal, assigning zero total and free memory to the device. As a result, the internal fit algorithm simply avoids putting any layers on that device, instead of hard crashing.
The release also includes builds for macOS Apple Silicon (both vanilla and KleidiAI‑enabled), macOS Intel, iOS, Linux (CPU, Vulkan, ROCm 7.2, OpenVINO, SYCL), Android arm64, and Windows (CPU, CUDA 12/13, Vulkan, OpenCL Adreno, OpenVINO, SYCL, HIP). With 120k stars and 20.5k forks on GitHub, llama.cpp remains the go‑to tool for running models like Llama, Mistral, and Gemma locally. This update particularly matters for edge deployments and developers juggling limited GPU memory, as it eliminates a frustrating crash that previously forced manual device exclusion.
- Fixes fatal CUDA crash when querying memory on a device with zero free VRAM – now assigns zero memory and skips the device.
- Cross‑platform builds including Apple Silicon (KleidiAI), Windows CUDA 12/13, Android arm64, and Linux ROCm/Vulkan.
- Prevents startup crashes in multi‑GPU setups or when using '--dev none' on CUDA‑enabled builds.
Why It Matters
More reliable local LLM inference for developers constrained by GPU memory, eliminating a common hard crash.