Short answer
CUDA (Compute Unified Device Architecture) is NVIDIA's platform for running general-purpose programs on its GPUs. Released in 2007, it includes a C++-based programming model, the nvcc compiler, a runtime and driver, debugging and profiling tools, and libraries such as cuBLAS, cuDNN and NCCL. PyTorch, TensorFlow, JAX and most AI software call these libraries, which in turn run the matrix math on Tensor Cores. CUDA is free to download but only runs on NVIDIA GPUs, which is a big reason NVIDIA dominates AI hardware.
What CUDA includes
| Part | What it does |
|---|---|
| Programming model | C++ extensions for writing GPU functions, called kernels, and launching them across thousands of threads |
| nvcc compiler | Compiles CUDA C++ into GPU machine code and PTX, NVIDIA's portable intermediate code |
| Driver and runtime | Moves data between CPU and GPU memory, launches kernels and manages devices |
| cuBLAS and CUTLASS | Matrix multiplication, the core of neural networks, tuned for each GPU generation |
| cuDNN | Deep learning building blocks such as convolutions, attention and normalization |
| NCCL | Fast communication between GPUs over NVLink and networks, used for multi-GPU training |
| TensorRT | Optimizes trained models for fast inference, including FP8 and FP4 |
| Nsight tools | Profilers and debuggers that show where a GPU program spends its time |
How a CUDA program works
A CUDA program runs on the CPU and hands heavy work to the GPU as kernels. When a kernel launches, the GPU runs it on a grid of thread blocks. Each block runs on one streaming multiprocessor (SM), where its threads are scheduled in groups of 32 called warps. This simple kernel adds two vectors, with each thread handling one element:
__global__ void add(const float* a, const float* b, float* c, int n) {
int i = blockIdx.x * blockDim.x + threadIdx.x;
if (i < n) c[i] = a[i] + b[i];
}
// Launch enough blocks of 256 threads to cover n elements
add<<<(n + 255) / 256, 256>>>(a, b, c, n);An RTX 5090 has 170 SMs and a B200 has 148, so a single launch can keep tens of thousands of threads in flight at once. Matrix-heavy kernels use special warp-level instructions that feed the Tensor Cores, but most developers never write those by hand: they call cuBLAS, cuDNN or a framework that does.
CUDA the platform vs CUDA cores
NVIDIA uses the same name for two things. CUDA is the software platform. CUDA cores are the general-purpose arithmetic lanes inside each SM, which do one multiply-add per clock on single numbers. Tensor Cores do whole small matrix multiplies at once. CUDA software drives both. Read Tensor Cores vs CUDA Cores for the hardware side.
Why AI depends on CUDA
When you train or run a model in PyTorch on an NVIDIA GPU, almost every operation becomes a call to a CUDA library: matrix multiplies to cuBLAS or CUTLASS, attention to cuDNN or FlashAttention, gradient exchange to NCCL. NVIDIA tunes these libraries for each new GPU before it ships, so new hardware is fast from day one. Nearly two decades of code, tutorials, research and tools built on CUDA make it hard to replace. That ecosystem, more than any single chip, is often called NVIDIA's moat.
Compute capability by GPU
Each NVIDIA GPU generation has a compute capability version that tells CUDA which features it supports, such as FP8 or FP4 Tensor Cores.
| GPU | Architecture | Compute capability |
|---|---|---|
| V100 | Volta | 7.0 |
| A100 | Ampere | 8.0 |
| RTX 30 series | Ampere | 8.6 |
| RTX 40 series, L40S, L4 | Ada Lovelace | 8.9 |
| H100, H200 | Hopper | 9.0 |
| B200, GB200 | Blackwell | 10.0 |
| RTX 50 series, RTX PRO 6000 Blackwell | Blackwell | 12.0 |
Alternatives to CUDA
- AMD ROCm and HIP: AMD's open platform. HIP closely mirrors the CUDA API, and the HIPIFY tools convert much CUDA code automatically. See AMD vs NVIDIA for AI.
- Intel oneAPI and SYCL: an open, multi-vendor programming model for Intel GPUs and other hardware.
- Apple Metal and MLX: for the GPUs in Apple silicon Macs.
- Triton: a Python language for writing GPU kernels that compiles for both NVIDIA and AMD GPUs.
- Vulkan compute: used by tools such as llama.cpp to run models on almost any GPU, usually more slowly than with CUDA.
Do you need to learn CUDA?
To use AI tools, no. Ollama, LM Studio, ComfyUI and PyTorch install the CUDA pieces they need; you only need a recent NVIDIA driver. Learning CUDA pays off if you write custom kernels, optimize inference engines or work on GPU performance, where understanding warps, memory and Tensor Cores makes the difference between 20% and 70% of peak.
Frequently asked questions
Is CUDA free?
Yes. The CUDA Toolkit is a free download from NVIDIA for Windows and Linux. It is proprietary, though, and runs only on NVIDIA GPUs.
Does CUDA work on AMD or Intel GPUs?
Not officially. AMD GPUs use ROCm, where code written with HIP looks very similar to CUDA. Some third-party projects try to run CUDA programs on other GPUs, but they are not supported by NVIDIA.
Which CUDA version do I need?
Usually whichever your framework was built with. PyTorch packages include their own CUDA runtime, so you mainly need an NVIDIA driver new enough to support it. Newer GPUs such as the RTX 50 series need recent CUDA versions because older ones do not know their compute capability.
What does CUDA stand for?
Compute Unified Device Architecture, although NVIDIA now simply uses the name CUDA.



