Master 2D thread indexing in CUDA by mapping multidimensional grids to linear memory. You will implement row-major indexing, build a naive matrix multiplication kernel, and apply 2D grid-stride loops. These skills allow you to process large, rectangular datasets efficiently while ensuring your kernels remain scalable and flexible across various GPU architectures.
Overview
Syllabus
- Unit 1: Mapping Matrix Coordinates
- Mapping Matrix Coordinates
- Find the Hidden Index Bug
- Safe Matrix Threads
- Covering the Whole Matrix
- Patterned Matrix Values
- Unit 2: Naive Matrix Multiplication
- Building Matrix Products
- Debugging Matrix Multiplication
- Safe Threads for Matrix Multiply
- Shaping the Launch Grid
- Matching Matrix Dimensions
- Unit 3: 2D Grid Stride Loops
- Mastering Matrix Strides
- Debugging Matrix Stride Loops
- Finishing Matrix Addition
- Scaling Matrix Work
- Hunting Matrix Stride Bugs