r/ComputerEngineering • Performance Architect • Sep 06 '19

Computer Architecture Highlights: Week 8

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 a fairly recent one from 2016 on fused-layer CNN accelerators!

Title: Fused-Layer CNN Accelerators

Conference: MICRO 2016

Paper Link: Link

 

Problem: Deep convolutional neural neural networks are dominant in computer vision, and play key roles in things like speech recognition and natural language processing. Because of the inherent parallelism within convolution operations, many of these operations are performed on GPUs, FPGAs, and ASICs. However, as the number of convolutional layers increase, so does the amount of off-chip memory traffic. Classic implementations of CNNs compute convolutional layers individually, and store the results off-chip in DRAM (these are loaded as the input to the next layers). This is an intuitive approach, and works around the fact that on-chip storage is limited. However, in the case of VGGNet-E, this means each each image will generate 77MB of off-chip feature map data transfer per-image!

 

Solution: Exploit the fact that there is data locality between layers! There's no reason why we need to compute an entire layer before we progress to the next. If we think about this like accumulating partial results, we don't care about the ordering of "A + B" or "B + A", as long as the results are the same. To the same end, we don't care if we accumulate partial results from multiple layers that have all their dependencies met in such a way that maximize locality (in-fact, we often prefer it!).

The main idea is that we can break the problem into tiles, and compute the operations from multiple convolutional layers on each tile by directly feeding the outputs of one layer to the inputs of another. By doing this, we reduce the problem to a size to one we can keep on-chip, and avoid saving intermediate results off-chip. The authors further show there are a range of design choices depending on how many layers you want to fuse, and adding additional buffer space to cache computations that will be the same between tiles.

 

Major Impact: This paper gave some great insight into the deficiencies of modern CNN design, and has been cited 176 times (as of 9/6/2019). In the paper they showed that they could decrease the off-chip traffic for each image from 77MB to 3.6MB! A lot of parallels can be drawn from this paper to the software optimization strategy of data-oriented design. In many many cases, reasoning about how your data is being accessed/used should be your primary concern in software design. Furthermore, the authors showed that these same techniques could be applied to CPUs to achieve a 2x speedup on AlexNet!

 

That's all for this week! Check out the paper linked above for more details how they explored the design space, and more on the fine-grained details of re-use patterns in convolutional neural networks! Have a nice weekend!

 

--Nick

Last Week's: Link -->

My YouTube channel with similar teaching content.

My GitHub where I post all my teaching code.

35 Upvotes

0 comments sorted by