CUDA – explained simply
CUDA is Nvidia’s platform that lets programs use the graphics card for general-purpose computing like AI.
Also: Nvidia CUDA, CUDA Toolkit, cu128, cu126
CUDA is the reason Nvidia cards are so common in AI: almost every AI program is written for CUDA first. Nvidia describes the toolkit as a development environment for GPU-accelerated applications, with libraries, tools, and a compiler.
You’ll most often run into CUDA as a version number. PyTorch comes in different builds, for example for CUDA 11.8, 12.6, or 12.8; in the install command, you’ll then see something like cu118 or cu128. ComfyUI Portable offers one package with CUDA 13.0 for modern RTX cards and one with CUDA 12.6 for the 10 series and older.
The program’s CUDA version and your driver have to match. Newer cards need newer CUDA versions, and very old cards are eventually no longer supported by new versions.
What does that mean for you? When downloading, choose the package that matches your card generation, and keep your Nvidia driver up to date.
Related terms
Errors where that matters
- A1111/Forge with RTX 50: sm_120 is not compatible
- A1111/Forge: Torch is not able to use GPU
- Chatterbox: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False (model wants a graphics card that PyTorch can’t see)
- CUDA gone after installing a custom node or package
- CUDA out of memory (VRAM full)
- CUDAExecutionProvider is not in available provider names (onnxruntime runs only on the CPU)
- Expected all tensors to be on the same device (data partly on GPU, partly on CPU)
- faster-whisper: cublas64_12.dll is not found
- faster-whisper: Requested float16 compute type, but the target device or backend do not support efficient float16 computation (rechen format doesn't match the device)
- HostBuffer.read_file_slice failed (crash caused by the new Dynamic VRAM memory management)
- KoboldCpp closes immediately while loading
- llama.cpp: CUDA error: out of memory
- LM Studio: Error loading model. (Exit code: …) Unknown error (model won’t load)
- LM Studio: No LM Runtime found
- no kernel image is available (graphics card does not match the PyTorch version)
- No module named 'sageattention' (starting with --use-sage-attention fails)
- nvidia-smi: command not found in WSL (CUDA not available in WSL — the only correct driver is the Windows driver)
- Ollama uses the CPU instead of the graphics card
- OSError: CUDA_HOME environment variable is not set (CUDA toolkit with nvcc is missing during compilation)
- RuntimeError: CUDA error: an illegal memory access was encountered – the graphics card accessed invalid memory
- RuntimeError: No CUDA GPUs are available (PyTorch does not see a usable NVIDIA graphics card)
- SwarmUI: Torch not compiled with CUDA enabled
- The NVIDIA driver on your system is too old
- Torch not compiled with CUDA enabled
- torch._scaled_mm is only supported on CUDA devices with compute capability >= 9.0 or 8.9 (fp8 fast mode needs RTX 40 or newer)
- Transformers: FlashAttention2 has been toggled on, but … flash_attn seems to be not installed (FlashAttention missing)
- UserWarning: FP16 is not supported on CPU; using FP32 instead (Whisper is running on the processor instead of the graphics card)
- UserWarning: Torch was not compiled with flash attention – usually harmless on Windows
- vLLM: Bfloat16 is only supported on GPUs with compute capability of at least 8.0 (graphics card too old for BF16)
- vLLM: The model's max seq len is larger than the maximum number of tokens that can be stored in KV cache / No available memory for the cache blocks (context does not fit in the VRAM)
- xFormers can't load C++/CUDA extensions (version conflict)