AI Infra Interviews logo
How work runs · free reference

Grid

A grid is the collection of thread blocks created by one CUDA kernel launch. Its dimensions describe how much block-level work the launch supplies.

Thread block gridLaunch grid

How it works

The grid can contain many more blocks than the device can keep resident. Completed blocks release resources so pending blocks can run. A small grid can leave SMs idle even when the individual block uses resources efficiently.

A launch is software work. An SM is hardware.
A launch for 1,000 elements with 256 threads per block creates 1,024 logical threads. The final 24 skip the array access. Blocks can run in successive waves; this diagram does not imply four physical SMs or simultaneous execution.

Work through an example

If a simplified device can execute 80 blocks at a time, 100 equal-duration blocks need two waves. The second wave has only 20 blocks. Actual scheduling also depends on block duration and placement.

Where the term can mislead

The grid size is a software launch choice, not the number of SMs or the maximum number of simultaneously resident blocks.

Connect the idea

Take it into practice

Continue with the existing concept, apply it to an interview problem, or follow a course lesson. Access requirements are shown before you open a page.

New to GPUs? Start with the free execution-model concept.

Sources and scope

Examples here are teaching calculations, not measured GPU performance. Consult the linked documentation for the exact device, instruction and tool version. Source review: 25 October 2026.

  1. NVIDIA CUDA Programming Guide: programming model ↗