AI Infra Interviews logo
How work runs · free reference

Thread block

A thread block is a group of CUDA threads that can share block-scoped memory and synchronize together. PTX commonly calls it a cooperative thread array, or CTA.

BlockCTACooperative thread array

How it works

An ordinary block is assigned to one SM. Its threads share a lifetime for block resources, so the block’s register and shared-memory requirements affect how many blocks can reside together. A block barrier coordinates participating threads before later accesses.

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 block loads a tile into shared memory, all required writes must finish before threads read one another’s values. Place synchronization on a control-flow path all required threads can reach.

Where the term can mislead

A block barrier does not synchronize the entire grid. Separate kernel launches or supported cooperative mechanisms are needed for wider coordination.

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 ↗
  2. NVIDIA PTX ISA: instruction semantics and target requirements ↗