r/ComputerEngineering • Performance Architect • Jul 26 '19

Computer Architecture Highlights: Week 2

Hi all! I'm an architecture PhD student, and I wanted to start posting a brief summary of an influential research paper (either old or new) every week! Here's one from the GPU architecture community to finish your week with!

Title: Energy-efficient Mechanisms for Managing Thread Context in Throughput Processors

Conference: ISCA 2011

Paper Link: Link

 

Problem: The massively multi-threaded design of GPUs leads them to have massive register files to support all the thread contexts (GPUs do a great job at hiding long latency memory accesses by swapping in different threads that have useful work). However, accessing large structures (like these register files) can cost a significant amount of energy that could be better allocated for more useful work.

 

Solution: First, characterize the lifetime of registers in common applications. Most values are read fewer than 2 times, and often these reads are within a few instructions from the original write. This means that we have a significant amount of locality to exploit, and we are wasting energy accessing a large structure like the main register file (MRF)! Adding a register file cache (RFC) can help reduce the number of accesses to the MRF.

However, the RFC also takes up space, and if we have too many threads accessing it, we'll end up not getting any hits, or we'll require another large structure. We can therefore use a two-level scheduler that has a small set of active threads that can be scheduled to hide the small latency of arithmetic instructions and make use of the RFC, and a larger pending set of threads that can be swapped in when a long-latency memory access occurs in the active set.

 

Major Impact: Simple ideas are often some of the best ideas because they can be realistically implemented. This paper showed that you could reduce MRF accesses by 40-80% through a few small but deliberate changes to the micro-architecture. Another great thing about this paper was that the idea was actually implemented! If you look at NVIDIA GPUs, you'll see mention of something called an "operand reuse cache" that works in a similar fashion to the RFC (you can even see instructions with registers specifically marked for reuse in the assembly as well, like FFMA.FTZ R23, R26.reuse, 4.5, R37.reuse; ).

 

That's all for this week! Check out their paper linked above for more details into how they characterized the reuse of registers and explored the design space for RFC size, and number of active threads accessing the RFC! Until next time,

 

--Nick

Last Week's: Link -->

Next Week's: Link -->

My YouTube channel with similar teaching content.

My GitHub where I post all my teaching code.

41 Upvotes

14 comments sorted by

View all comments

5

u/fuyukihana Jul 26 '19

Thanks! Again, super relevant to my studies and majorly appreciated. Gonna look at this one to figure out how they threaded it like this. :)

3

u/EngrToday Performance Architect Jul 26 '19

Always happy to help!