GPU Architecture · Reference Card

CUDA Dev Setup — Windows 11 (RTX 50 / Blackwell)

The four things to install, in the order that avoids pain, plus how to prove each one works.

Pick a path — you do NOT need the full Visual Studio IDE

Track A · WSL2 (recommended — no Visual Studio at all): run Ubuntu inside Windows 11; the Linux CUDA toolkit uses gcc. Only the Windows driver is installed on the host. Contained, free, removable, uses your local 5050. Best if IDE bloat is the concern.
Track B · Native Windows with Build Tools (minimal MSVC, no IDE): on native Windows nvcc requires MSVC as its host compiler — but the command-line Build Tools suffice; you don't need the IDE. Pick this only if you specifically want native Windows.
A cloud VM is unnecessary — you have a capable local GPU.

Track A — WSL2, existing Ubuntu (no Visual Studio)

You already have WSL2 + Ubuntu, so we just install the toolkit into it. The one rule: install only the CUDA toolkit inside WSL, never a Linux display driver — the Windows driver provides the GPU. Follow NVIDIA's CUDA on WSL guide alongside these steps.

  1. Confirm the pieces are in place

    Install/refresh the latest Windows NVIDIA driver via the NVIDIA App (the only driver you install — it feeds the GPU into WSL). Then check your distro in PowerShell:

    wsl -l -v

    Should list your Ubuntu as VERSION 2. Note the exact Ubuntu version (lsb_release -a inside it); 22.04 or 24.04 are both fine for CUDA-on-WSL.

  2. CUDA Toolkit (inside Ubuntu)

    Enter Ubuntu (wsl), then use the WSL-Ubuntu repo and the toolkit-only package. Representative commands — copy the exact, current ones from the CUDA downloads page → Linux → x86_64 → WSL-Ubuntu → deb (network), since the keyring version changes:

    wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb sudo dpkg -i cuda-keyring_1.1-1_all.deb sudo apt-get update sudo apt-get -y install cuda-toolkit-13-3

    critical Install cuda-toolkit-13-3, not cuda-13-3 or cuda — those pull a Linux GPU driver that overwrites the Windows driver stub and breaks the passthrough. The WSL-Ubuntu repo's toolkit package omits the driver by design.

  3. Host compiler + PATH

    sudo apt-get install -y build-essential echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc

    build-essential gives gcc/g++ (nvcc's host compiler — the "no Visual Studio" win). The PATH lines put nvcc and the CUDA libs where the shell can find them.

Track B — Native Windows (Build Tools, no IDE)

  1. NVIDIA driver

    Latest Windows driver via the NVIDIA App. Reboot.

  2. Build Tools for Visual Studio (not the IDE)

    On the downloads page scroll to "Tools for Visual Studio" → "Build Tools for Visual Studio 2022." In the installer check "Desktop development with C++." No IDE is installed — just the command-line MSVC (cl.exe) + Windows SDK that nvcc needs.

  3. CUDA Toolkit 13.3

    Download → Windows → x86_64 → 11 → exe (local). Choose Custom and you can uncheck "Visual Studio Integration" (only useful with the full IDE). nvcc + libraries + Nsight still install. Compile from the "x64 Native Tools Command Prompt" Build Tools adds to the Start menu.

Verify (either track)

nvidia-smi

Driver version, GPU name, and the max CUDA the driver supports. In WSL this runs inside Ubuntu and still sees your 5050. Proves driver + GPU are alive.

nvcc --version

The toolkit compiler version (should say 13.3). Proves nvcc is on your PATH.

First program

Grab the official samples (they moved out of the toolkit to GitHub) and build the classic device query:

git clone https://github.com/NVIDIA/cuda-samples

…then build deviceQuery (in Samples/1_Utilities/deviceQuery) — it prints every number from these lessons for your real GPU: SM count, registers/SM, shared memory/block, L2 size, memory bandwidth. Or ask your teacher for a minimal hand-written version to compile with nvcc hello.cu -o hello.

Gotchas & good-to-knows

Stuck on any step? Tell me the exact error or the output of nvidia-smi / nvcc --version and I'll debug it with you. Once it's green, ask me for the first "hello GPU" kernel — a ~20-line program that prints your 5050's real SM count, register file, and bandwidth, straight out of these lessons.

⌂ Home Glossary →