GPU Detection Methods
NVIDIA GPUs
llmfit detects NVIDIA GPUs via two methods:1. nvidia-smi (Primary)
- NVIDIA Grace/DGX Spark (GB10, GB20):
addressing_modereturns “ATS” (Address Translation Services) - When VRAM is unavailable, falls back to
/proc/meminfofor total RAM
- Aggregates same-model GPUs (e.g., 2x RTX 4090 → count=2, per-card VRAM=24GB)
- Total VRAM = per-card VRAM × count (for tensor splitting across cards)
2. sysfs Fallback (Containers/Toolbx)
When nvidia-smi is unavailable (common in containers):lspci -nnqueries PCI slot from sysfsueventfile- Matches GPU model from lspci output (e.g., “GeForce RTX 2060”)
- Fallback to
flatpak-spawn --host lspciin Flatpak environments
- Checks
DRIVER=in sysfsueventfile nvidiadriver → CUDA backend- Other drivers (nouveau, etc.) → Vulkan backend
AMD GPUs
llmfit detects AMD GPUs via three methods:1. rocm-smi (ROCm installed)
- Tracks per-GPU VRAM from multiple “Total” lines
- Backend: ROCm
2. sysfs (No ROCm)
lspci -nnfor AMD/ATI VGA/3D controllers- Backend: Vulkan (no ROCm)
3. Unified Memory APUs
Ryzen AI series APUs (Strix Halo, Strix Point) share system RAM:- VRAM = total system RAM (unified pool)
- Backend: Vulkan
unified_memoryflag set totrue
Intel Arc GPUs
llmfit detects Intel Arc via sysfs and lspci:Discrete GPUs (Arc A770, A370M)
Integrated GPUs (Arc Graphics in Meteor Lake)
- Discrete: Reports exact VRAM
- Integrated: Reports 0 VRAM (shares system memory)
- Backend: SYCL (Intel oneAPI)
Ascend NPUs
llmfit detects Huawei Ascend NPUs vianpu-smi:
- Each NPU tracked separately (count=1 per NPU)
- VRAM = HBM capacity in MB → GB
- Backend: Ascend
Installation Methods
Homebrew (Recommended)
Quick Install Script
From Source
Troubleshooting
GPU Not Detected
NVIDIA:-
Check if nvidia-smi works:
-
If nvidia-smi fails, check sysfs:
-
Install nvidia-utils package:
-
Manual override:
-
Check if rocm-smi works:
-
Install ROCm:
-
Sysfs fallback (no ROCm):
-
Check sysfs vendor ID:
-
Check lspci:
-
Install Intel compute runtime:
VRAM Shows 0 or Wrong Value
Broken nvidia-smi:WSL-Specific Issues
llmfit detects WSL via environment variables and/proc/version:
- Install NVIDIA CUDA on WSL2: https://docs.nvidia.com/cuda/wsl-user-guide/
- nvidia-smi should work once CUDA drivers are installed
- Limited support; ROCm not officially supported in WSL
- Use CPU-only mode or run llmfit natively on Windows
