Thread block
A thread block is a group of GPU threads organized to execute together and cooperate using shared resources.
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.
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.
What to know first
- 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.
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- CUDACUDA is NVIDIA’s parallel computing platform and programming model for performing general-purpose computations on NVIDIA GPUs.
- arrayAn array is an ordered collection of elements organized in one or more dimensions and accessible by position or index.
Related concepts
- 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.
- gridpart of · A GPU grid is the collection of thread blocks or program instances launched to execute a single kernel.
- warphas part · A warp is a group of GPU threads scheduled and issued together for execution, typically processing the same instruction on different data.
- 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.
- loopuses · A loop is a programming-language control-flow construct that repeatedly executes a block of instructions according to an iteration rule or continuation condition.
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.



