Grid
A GPU grid is the collection of thread blocks or program instances launched to execute a single kernel.
GPU Programming with Triton
A GPU grid is the complete collection of blocks or program instances launched for one kernel call.
- How it is used
- Organizes a kernel launch into program instances that collectively cover a vector or matrix workload.
- How deep it goes
- Explains grid sizing, program IDs, boundary masking, launch metadata, and scheduling across streaming multiprocessors.
- Examples
- Uses vector addition and a two-dimensional matrix grid to illustrate work assignment.
- What you can do after
- Apply it via Triton to size a launch grid and map program instances to data tiles.
CUDA for LLMs
A CUDA thread grid is the complete collection of thread blocks launched for one kernel execution.
- How it is used
- Maps parallel kernel work across blocks and threads for vector, matrix, and tensor operations.
- How deep it goes
- Works through launch sizing, global indexing, and boundary checks in one and multiple dimensions, then relates grids to tiled GEMM.
- Examples
- Uses vector addition, 2D matrix addition, and 3D tensor addition to illustrate launch configurations.
- What you can do after
- Builds CUDA kernels from scratch with grid dimensions, per-thread indices, and boundary checks.
Grokking GPU Programming
A grid is a CUDA launch hierarchy containing the thread blocks of a kernel execution.
- How it is used
- Organizes the thread blocks launched for a CUDA kernel.
- How deep it goes
- Explains the grid hierarchy and block scheduling, while leaving synchronization between blocks to later treatment.
- Examples
- Uses a school analogy and a launch with four blocks of 256 threads each.
- What you can do after
- Understand how a kernel launch groups work and why blocks must not rely on execution order.
What to know first
- CUDACUDA is NVIDIA’s parallel computing platform and programming model for performing general-purpose computations on NVIDIA GPUs.
- threadA thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- tensorA tensor is a multidimensional numerical array whose values are arranged along indexed dimensions and can be manipulated through mathematical computation.
- reduction operationA reduction operation combines multiple input values according to a rule to produce fewer results, often a single aggregate.
Related concepts
- thread blockhas part · A thread block is a group of GPU threads organized to execute together and cooperate using shared resources.
- threadhas part · A thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- CUDA execution hierarchypart of · The CUDA execution hierarchy is the organization of a kernel launch into a grid containing blocks, with each block containing threads.
- program instanceproduces · A program instance is Triton's unit of work corresponding to one block of input elements in a compiled kernel launch.
- tilehas part · A tile is a bounded block of elements from a larger array, matrix, or tensor that is treated as a unit of computation.
Questions about grid
What is grid?
A GPU grid is the collection of thread blocks or program instances launched to execute a single kernel.
Which Manning books explain grid?
GPU Programming with Triton, CUDA for LLMs and Grokking GPU Programming.
What should I know before learning grid?
Manning books that teach grid usually introduce CUDA, thread, tensor and reduction operation first.
What is grid part of?
Grid is part of CUDA execution hierarchy. The CUDA execution hierarchy is the organization of a kernel launch into a grid containing blocks, with each block containing threads.
What are the parts of grid?
Grid includes thread block, thread and tile.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


