• Stefy Lanza (nextime / spora )'s avatar
    vulkan: read free VRAM from amdgpu sysfs (CUDA query is NVIDIA-only) · f204f399
    Stefy Lanza (nextime / spora ) authored
    _free_vram_gb() used torch.cuda.mem_get_info, which returns 0 on an
    AMD/Vulkan engine (no CUDA). That made the auto-offload sizing guard
    (_free > 0) silently false, so n_gpu_layers stayed at -1 (all) and a
    model larger than VRAM was forced entirely onto the GPU — OOM, "Failed
    to load model from file" (e.g. a 13 GB gemma4 model on an 8 GB RX 580).
    A 24 GB CUDA card has room for all layers, so the bug was invisible
    there. Fall back to amdgpu sysfs (mem_info_vram_total - vram_used,
    indexed by Vulkan device order) so AMD GPUs size partial offload too.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    f204f399
Name
Last commit
Last update
..
admin Loading commit data...
api Loading commit data...
backends Loading commit data...
broker Loading commit data...
frontproxy Loading commit data...
models Loading commit data...
openai Loading commit data...
pydantic Loading commit data...
queue Loading commit data...
tasks Loading commit data...
__init__.py Loading commit data...
cli.py Loading commit data...
config.py Loading commit data...
main.py Loading commit data...
platform_paths.py Loading commit data...