C.W.K.
Stream
← C.W.K. Quests
🖥️

GPU Compute Quest

Updated: 2026-05-04

CUDA & Metal Primer — read GPU code like prose

Read GPU code like prose. CUDA on NVIDIA, Metal on Apple — same colony, different uniforms. Eight tracks walk you from your first nvcc --version to a profiler-driven view of why vendor BLAS beats your hand-rolled GEMM by 10×.

8 tracks · 38 lessons · ~7.7h · difficulty: intermediate-to-advanced

Level 0Beginner
0 XP0/38 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
GPU Compute Quest is the kernel-level partner to MLX Quest, PyTorch Quest, and JAX Quest. Where those teach the framework, this teaches what the framework lowers to. You'll install a CUDA toolchain and a Metal toolchain, ship hello kernels in both, internalize the SIMT mental model (warp = 32-ant platoon), build vector-add and matrix-add by hand, then naive GEMM and tiled GEMM. The last two tracks open the hood on vendor BLAS so you can read Nsight Compute and Apple Instruments output without flinching. Tested rigs: Windows 11 + RTX 4090 (CUDA 13.2) on the NVIDIA side, macOS Tahoe + 80-core Mac Studio M3 Ultra (Xcode 26, Metal 4) on the Apple side. Code samples are runnable; profiling numbers are real.

Tracks

  1. 01🔧CUDA Setup — Get NVCC Talking

    0/5 lessons

    Driver, toolkit, NVCC: the three-layer stack you actually have to install

    CUDA C++ looks like plain C++ but adds three syntax extensions that change everything: function qualifiers, the triple-angle launch, and SIMT built-ins. Before any of it works, you need NVCC, a matching driver, and a Visual Studio or Linux toolchain to glue host and device code together. This track gets you from a blank Windows or Linux box to a green nvcc --version and a working hello kernel.

    Lesson list (5)Quiz · 5 questions
  2. 02🍎Metal Setup — Apple Silicon Path

    0/5 lessons

    Metal Shading Language, Xcode 26 toolchain, Unified Memory advantage

    Metal is Apple's CUDA — same SIMT mental model, different vocabulary, and one architectural advantage that genuinely changes how you write code: Unified Memory. Same DRAM physically backs the CPU and GPU, so cudaMemcpy disappears. This track installs the Metal toolchain, ships a hello kernel in pure Swift, and gives you a CUDA ↔ Metal cheat sheet so you can read either codebase in five minutes.

    Lesson list (5)Quiz · 5 questions
  3. 03📐Linear Algebra for AI

    0/4 lessons

    Why every model collapses to dot product + GEMM — and how the roofline keeps you honest

    Every neural net at compile time becomes a sequence of dot products and matrix multiplies. That's not a metaphor — it's literally what XLA, TensorRT, and torch.compile lower to. Once you internalize that, choosing kernels and reading roofline plots becomes mechanical. This track builds the AXPY/GEMV/GEMM mental ladder, explains why GPUs love Level-3 BLAS, and shows you the arithmetic intensity that decides memory-bound vs compute-bound.

    Lesson list (4)Quiz · 5 questions
  4. 04🐜Hello GPU Reinforced

    0/4 lessons

    Same hello kernel, deeper understanding — ant colonies, warps, divergence

    You already saw a hello kernel run. This track replays it with the proper mental model: the GPU is an ant colony, blocks are squads, warps march in lockstep. Then we expand it to a configurable battalion that lets you feel block size, grid size, and warp divergence in your fingertips. By the end, the launch geometry stops feeling magical and starts feeling like a sergeant calling formations.

    Lesson list (4)Quiz · 5 questions
  5. 05➡️Vectors — The First Real Workload

    0/5 lessons

    Embarrassingly parallel arithmetic, the 9-step GPU workflow, VRAM capacity zones

    Vector add is the smallest workload that reveals everything: the host/device memory split, the launch grid, the bandwidth ceiling, the VRAM cliff. We walk the 9-step workflow once for CUDA, once for Metal, then variations (sub/mul/div) that look identical but expose latency differences. The track closes by showing how numpy / PyTorch / MLX hide all this — and why you should still know what's underneath.

    Lesson list (5)Quiz · 5 questions
  6. 06🔢Matrices — Where Tiling Earns Its Keep

    0/5 lessons

    Coalesced access, reduction, naive vs tiled GEMM, the matrix_ops CLI

    Matrices are where 'just throw threads at it' stops working. Coalesced reads matter. Tiling matters. Reduction trees matter. This track builds row-major intuition, walks reduction patterns from warp-shuffle to block-tree, and finishes with the dramatic 9× speedup from naive to tiled GEMM. The matrix_ops CLI we ship is the lab bench you'll actually run on your machine.

    Lesson list (5)Quiz · 5 questions
  7. 07📚BLAS 101 — Stop Hand-Rolling

    0/5 lessons

    What BLAS is, cuBLAS + MPS cheat sheets, calling BLAS from Python, precision playbook

    Vendor BLAS routines have decades of tuning baked in. Even your best hand-rolled GEMM hits ~5% of peak; cuBLAS hits 80%+. This track teaches when to call BLAS, how to call it from CUDA, Metal, and Python, and the precision tradeoff (FP32 vs FP16/BF16 vs Int8/Int4) that decides whether your model fits at all on a given GPU.

    Lesson list (5)Quiz · 5 questions
  8. 08🔬BLAS Deep Dive — What Vendors Actually Do

    0/5 lessons

    Five tuning pillars, Nsight Compute, Apple Instruments, modern GEMM tiling

    Open the hood. Vendor BLAS hits 90% of peak through five pillars: blocking, micro-kernels, split-K, heuristic algo pickers, epilogue fusion. We read real Nsight Compute reports, real Apple Instruments traces, and decode the three-tier tile pyramid that both ecosystems converge on. By the end you can look at a profiler row and say 'I know exactly which pillar is breaking.'

    Lesson list (5)Quiz · 5 questions
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.