Register (GPU)
A GPU register is the fastest form of storage within a streaming multiprocessor (SM). Registers store integer and floating point values used frequently by a thread, reducing reliance on slower memory types (shared, global, or local memory).
Registers are located within an SM in what is referred to as a register file. The number of registers depends on the GPU architecture, but modern GPUs support thousands of registers per SM.
For each thread that it executes, the SM allocates a set of registers for the private use of that thread. The registers are associated with that thread throughout its lifetime, even if the thread is not currently executing on the SM's cores (for example, if it is blocked waiting for data from memory). A thread can't access registers assigned to a different thread, preventing data conflicts between threads. If the execution of a kernel function by a thread requires more registers than available, the compiler arranges to spill some register data to the thread's local memory. Because local memory access is slower than register access, programmers should try to design their kernels to avoid or limit the amount of spill.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!