we launched the most comprehensive ai performance engineering repo in the world
now we'll be posting every single resource
follow and save to keep up with the series. links in thread 🧵
part 4: Programming Massively Parallel Processors: A Hands-on Approach
the authors explain how GPU hardware executes parallel programs and how memory access and work distribution affect performance.
for an AI performance engineer, the book connects those fundamentals to the algorithms and optimization techniques used to diagnose slow kernels and decide what to change.
it covers:
- CUDA programming and GPU execution, including CPU and GPU cooperation, multidimensional grids, warps, scheduling, and synchronization. the vector-addition, image-processing, and matrix-multiplication examples show how to assign work to threads and reason about execution efficiency.
- memory hierarchy, coalescing, tiled matrix multiplication, thread coarsening, and occupancy. the authors explain how to reduce memory traffic while accounting for register and shared-memory usage, then provide a checklist for identifying a computation's bottleneck.
- convolution and stencils, including constant memory, caching, shared-memory tiling, and register tiling. these examples show how neighboring outputs can reuse input values, reducing repeated memory accesses when computing over arrays and grids.
- histograms, reductions, and prefix sums, including atomic operations, privatization, and work efficiency. the authors show how to reduce contention, limit divergence, and combine partial results without adding unnecessary memory traffic or computation.
- merging and sorting, including input partitioning, tiled merge, radix sort, and merge sort. these chapters connect algorithm choice and thread-to-data mapping to memory coalescing and the distribution of work across the GPU.
- sparse matrices and graph traversal, including sparse matrix-vector multiplication and breadth-first search. the authors compare storage formats and parallelization strategies to show how memory access, control divergence, and contention affect performance.
- deep learning, including perceptron inference and backpropagation, convolutional neural networks, a CUDA convolutional-layer inference kernel, convolution expressed as matrix multiplication, and cuDNN. this chapter connects the book's GPU programming techniques to the implementation of neural-network computations.
- case studies in MRI reconstruction and electrostatic potential mapping. the authors work through parallelism, loop transformations, memory layout, and validation, including how scatter and gather approaches change the cost of a computation.
- computational thinking and parallel algorithm design, including algorithm selection and problem decomposition. these provide a method for finding parallel work and choosing an implementation around the computation's requirements.
- CUDA streams and heterogeneous clusters, including MPI communication and CUDA-aware MPI. a distributed stencil example shows how to overlap communication with computation and coordinate work across GPUs.
- dynamic parallelism and advanced CUDA practices, including GPU-launched kernels, zero-copy memory, unified memory, and profiling and debugging tools. the book examines how kernels launch work and access data, including the limitations that can affect execution efficiency.
- numerical considerations, including floating-point representation, rounding, arithmetic accuracy, and numerical stability. the appendix explains how arithmetic and algorithm choices affect the reliability of computed results.
the book develops these ideas through worked kernels and applications, then connects them to neural-network computation in its deep-learning chapter.
for an AI performance engineer, that makes the material useful for reasoning about kernel execution, reducing memory traffic, and checking numerical results.
Meet Kimi Code Desktop
Drop it into any dev workflow and get faster, more reliable results — programming tasks done in record time. Manage multiple agents in one focused space, run tasks in parallel, and stay in sync with your agents even on long-horizon work.
Now available on MacOS & Windows.
still waiting on grok 4.7 before i buy another sub. limits on grok are fine but swe 2 is free and strong enough that switching for a maybe better model feels dumb until it actually drops.
I cancelled my codex and supergok subscription for Devin pro. With it giving unlimited SWE 2 on local and cloud agents there is no reason to not be using it.
I cancelled my codex and supergok subscription for Devin pro. With it giving unlimited SWE 2 on local and cloud agents there is no reason to not be using it.
I tried t3code once, i dont like it. For starters its lacking many features that popular harnesses have, you cant connect your grok sub or devin or opencode etc. And it uses lots of RAM.
I tried t3code once, i dont like it. For starters its lacking many features that popular harnesses have, you cant connect your grok sub or devin or opencode etc. And it uses lots of RAM.
ive been using devin for the past couple months now. I have enough to get any sub i want but i think im going to wait until grok 4.7 comes out. the limits are really good and hopefully a really strong model. however currently SWE 2 is unlimited and free and also really strong.