r/ComputerEngineering • Performance Architect • Nov 06 '19

[Hardware] Computer Architecture Highlights: Week 15

Hi all! I'm an architecture Ph.D. student, and I wanted to start posting a brief summary of an influential research paper (either old or new) every week! Here's an interesting MICRO 2017 paper that shows how compiler/architecture co-design can be used to decrease the size of the GPU register file!

Title: RegLess: Just-in-Time Operand Staging for GPUs

Conference: MICRO 2017

Paper Link: Link

Background: How do GPUs hide long-latency operations like memory accesses? Massive multithreading! GPUs are able to quickly swap to threads that can make forward progress. However, we typically think of context switching as an expensive operation, so how can GPUs do it in a single cycle? MASSIVE register files! If we always have the entire context for each thread, we can quickly swap between them.

How large are these register files? On the order of 256kB per SM. This means we have megabytes of register file storage across an entire GPU. Do we use all of it? In many cases, no! That means we have a large, power-hungry structure in the GPU that we don't always need. Prior work in this area looked at shrinking the size of the RF and re-using registers (register file virtualization), and I've posted previously about register file caching, where we cache recently used registers in a smaller structure in front of the main RF to avoid the cost of accessing a large structure. Power and energy continue to be a concern, so is there more we can do?

Solution: The operand staging unit! Instead of relying on oblivious storage, we carefully manage which threads are active at any given moment, and use a novel compiler pass to break up code into regions that have only a small register working set. This allows us to minimize the storage in the operand staging unit over a RF. Using some extra metadata instructions, we can control the lifetime of registers, and when to evict registers that are still live across regions into memory (that we will preload later). Furthermore, we can optimize how we split regions based on load-use dependencies on long-latency memory instructions (these would leave us occupying space in the operand staging unit, but not being able to make forward progress).

Major Impact: This paper presented some interesting ways to handle the ever-growing register file sizes in GPUs. They showed that you could decrease register access energy by 75%, and total GPU energy by 11%, without sacrificing (almost) anything in performance. Furthermore, this paper showed how a co-design between the compiler and architecture can be used to provide a relatively simple solution that would be far more difficult to solve in hardware alone!

That's all for this week! Check out the paper linked above for more details on the optimizations they did to the design (such as value compression), and more details on how they manage the lifetimes of registers.

--Nick

Last Week's: Link

My YouTube: Link

My GitHub: Link

39 Upvotes

4 comments sorted by

9

u/alaparai Nov 06 '19

I'm an computer engineering masters student and love your posts. Thanks.

3

u/EngrToday Performance Architect Nov 06 '19

No problem! Glad you like them!

1

u/Preminence Nov 06 '19

Got any tips for a CE undergrad student going into my second semester of my sophomore year ?

2

u/EngrToday Performance Architect Nov 07 '19

Keep an open mind and explore different areas of CE. I've also found that building up solid programming skills in a language like C++ is really helpful.