M1 GPU register file size

By: ryu (anon.delete@this.anon.com), April 23, 2021 4:11 am
Room: Moderated Discussions
Alyssa Rosenzweig has posted a third article in the M1 GPU reverse-engineering series, giving more details about the shader core architecture. What I find particularly interesting is the discussion of the GPU register file. To briefly summarize, what we know is that the GPU uses scalar execution model, with each thread having access to up to 128 32-bit registers. If a program does not need too many registers, the GPU is able schedule more threads for simultaneous execution. In other words, the higher the register pressure, the fewer threads can there be in flight. By querying the API, it was determined that a single core can have at least between 384 (with highest register pressure) and 1024 (with lowest register pressure) simultaneous threads in flight, which leads to a register file size estimate of at least 208KiB per GPU core (or 52KiB per ALU core).

Another point she is making is that the register file is likely to be much larger. Apple states that M1 can have 24576 threads in flight (3072 per core). From this, Rosenzweig concludes that a GPU core can have up to three full threadgroups (1024 threads each) in flight, resulting in total register file size of 624KiB per core (or 4.875 MiB for the full 8-core cluster). Now, I am not sure that I can completely follow. It is not obvious to me that 3072 threads per core can be sustained in any scenario. Who says that this number is not subject to register pressure as well? Maybe the per-core register file is only around 256KiB and in order to maintain the full set of 3072 threads each thread has to use less than 80 bytes worth of registers on average. Even the minimum estimated 208KiB register file could still support 3072 threads using 16 32-bit registers each...
 Next Post in Thread >
TopicPosted ByDate
M1 GPU register file sizeryu2021/04/23 04:11 AM
  M1 GPU register file sizeMark Roulo2021/04/23 09:16 AM
Reply to this Topic
Body: No Text
How do you spell avocado?