Register Allocation

The popularity of general purpose Graphic Processing Unit (GPU) is largely attributed to the tremendous concurrency enabled by its underlying architecture – single instruction multiple thread (SIMT) architecture. It keeps the context of a significant number of threads in registers to enable fast “context switches” when the processor is stalled due to exe- cution dependence, memory requests and etc. The SIMT ar- chitecture has a large register file evenly partitioned among all concurrent threads. Per-thread register usage determines the number of concurrent threads, which strongly affects the whole program performance. Existing register allocation techniques, extensively studied in the past several decades, are oblivious to the register contention due to the concurrent execution of many threads. They are prone to making op- timization decisions that benefit single thread but degrade the whole application performance. Is it possible for compilers to make register allocation de- cisions that can maximize the whole GPU application per- formance? We tackle this important question from two dif- ferent aspects in this paper. We first propose an unified on-chip memory allocation framework that uses scratch-pad memory to help: (1) alleviate single-thread register pres- sure; (2) increase whole application throughput. Secondly, we propose a characterization model for the SIMT execu- tion model in order to achieve a desired on-chip memory partition given the register pressure of a program. Overall, we discovered that it is possible to automatically determine an on-chip memory resource allocation that maximizes con- currency while ensuring good single-thread performance at compile-time. We evaluated our techniques on a representa- tive set of GPU benchmarks with non-trivial register pres- sure. We are able to achieve up to 1.70 times speedup over the baseline of the traditional register allocation scheme that maximizes single thread performance.

References

2016

  1. Middleware
    Orion: A Framework for GPU Occupancy Tuning
    Ari B. Hayes, Lingda Li, Daniel Chavarrı́a-Miranda, and 2 more authors
    In Proceedings of the 17th International Middleware Conference, Jun 2016

2014

  1. ICS
    Unified On-Chip Memory Allocation for SIMT Architecture
    Ari B. Hayes, and Eddy Z. Zhang
    In Proceedings of the 28th ACM International Conference on Supercomputing, Jun 2014