liveBook · Manning

Thread block

A thread block is a group of GPU threads organized to execute together and cooperate using shared resources.

How 4 Manning books explain it

GPU Programming with Triton

A GPU block is a group of threads scheduled as a unit that can cooperate through shared memory.

How it is used
Uses blocks to connect Triton’s tiled programming model with GPU scheduling and thread cooperation.
How deep it goes
Explains the execution hierarchy, SM scheduling, and shared-memory visibility without implementing a complete block-level kernel.
Examples
Uses vector grid-sizing and thread-to-warp counting exercises to illustrate block arithmetic.
What you can do after
Evaluate/understand block scheduling and cooperation, and calculate grid and warp counts for simple workloads.

Read how GPU Programming with Triton explains thread block →

CUDA for LLMs

A CUDA thread block is a schedulable group of threads that can cooperate using shared resources.

How it is used
Uses blocks to scale CUDA launches and assign independent pieces of tiled GPU workloads.
How deep it goes
Works through launch indexing and boundary checks, then traces block-level tiling into warps, threads, and memory reuse.
Examples
Uses vector and matrix addition, tiled GEMM, and Flash Attention row ownership to illustrate block assignments.
What you can do after
Builds a CUDA vector-addition launch with block sizing, global indexing, and boundary checks.

Read how CUDA for LLMs explains thread block →

Fast Python: High performance techniques for large datasets

How it is used
Organizes GPU work into groups of threads when distributing kernel computations across the device.
How deep it goes
Defines blocks by shared SM placement, memory, synchronization, and launch sizing; leaves shared-resource algorithms for later.
Examples
Uses matrix scaling, array doubling, and Mandelbrot image generation to illustrate block sizing and bounds handling.
What you can do after
Apply Numba CUDA launch configurations and guard excess threads against indexing beyond array bounds.

Read how Fast Python: High performance techniques for large datasets explains thread block →

Grokking GPU Programming

A block is a CUDA launch hierarchy unit whose threads are grouped and scheduled for execution on GPU hardware.

How it is used
Scales work beyond a single block by dividing it among multiple blocks in one kernel launch.
How deep it goes
Explains block size limits, SM scheduling, and ordering constraints, but does not detail low-level hardware execution.
Examples
Uses classroom-and-grader analogies and a launch with four blocks of 256 threads each.
What you can do after
Apply CUDA launch configuration and block-based indexing to divide array work across threads.

Read how Grokking GPU Programming explains thread block →

What to know first

Related concepts

Questions about thread block

What is thread block?

A thread block is a group of GPU threads organized to execute together and cooperate using shared resources.

Which Manning books explain thread block?

GPU Programming with Triton, CUDA for LLMs, Fast Python: High performance techniques for large datasets and Grokking GPU Programming.

What should I know before learning thread block?

Manning books that teach thread block usually introduce thread, CPU, CUDA and array first.

What is thread block part of?

Thread block is part of grid. A GPU grid is the collection of thread blocks or program instances launched to execute a single kernel.

What are the parts of thread block?

Thread block includes thread and warp.

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.