liveBook · Manning

Register file

As explained in Grokking GPU Programming

A register file is a collection of fast on-chip registers that stores values for a processor's active threads.

Think of each thread’s registers as private sticky notes on its desk: they hold working values close at hand. An SM has a fixed register file shared among its resident threads, so threads that need more registers leave room for fewer others. section 14.6

More registers, fewer resident threads

With 65,536 registers, an SM can hold 2,048 threads at 32 registers per thread. At 64 registers per thread, it holds 1,024 threads—half as many. Register use is one limit on occupancy; shared memory and other constraints can also limit residency. section 14.6

Figure 14.4 Registers per thread set a ceiling on occupancy. The SM’s 65,536-register file is shared by every resident thread, so at 32 registers per thread it holds 2,048 threads (64 warps), but at 64 registers per thread only 1,024 threads (32 warps) fit: half the occupancy for double the registers.

Compare how per-thread register use changes the number of resident threads. section 14.6

How Grokking GPU Programming covers it

How deep it goes
Explains private per-thread storage and calculates occupancy for two register counts.
Examples
Compares 32 and 64 registers per thread in a 65,536-register file.
What you can do after
Evaluate how doubling registers per thread halves resident threads in the stated example.
How it connects
Links register use to occupancy, warps, and shared memory as limits on resident threads.

Also explained in

Compare how 2 books explain register file →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking GPU Programming. The section links point to the parts of the book it draws on.