CUDA, Triton & Kernel Engineering: the practice test
Coalescing, shared memory and bank conflicts, occupancy, fusion, tiled GEMM, FlashAttention internals, Triton, CUTLASS, Nsight profiling and torch.compile: the live-coding and take-home round at NVIDIA, Fireworks, Together and the labs' performance teams. This test drills exactly that: 10 easy, 10 medium and 10 hard questions, every one explained, every explanation linking into the worked material.
Sample questions, answered
A warp's 32 threads issue a load together. When they touch 32 consecutive 4-byte words, the memory system serves the whole warp with a few 128-byte transactions. When they stride through memory (thread i reads row i of a row-major matrix, say), every thread touches a different line and the warp needs 32 transactions for the same useful data, so effective bandwidth collapses by an order of magnitude. Choosing the thread-to-data mapping so that the fast index of the data matches the thread index is the first rule of every kernel.
Shared memory serves one 4-byte word per bank per cycle, with consecutive words in consecutive banks. If several threads in a warp hit different words that map to the same bank, the hardware replays the access once per conflicting word, so a 32-way conflict takes 32 cycles instead of one. Column-wise access of a row-major tile with a width that is a multiple of 32 is the classic case; padding the tile by one element, or swizzling the layout, spreads the accesses across banks. Reading the same word is a broadcast and costs nothing.
Go deeper than the quiz
A practice test measures recall. The material it draws from teaches the reasoning:
