NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Optimizing GPU Cache Policies for MI Workloads

Johnathan Alsop, Xianwei Zhang, Tsung Tai Yeh, Bradford M. Beckmann, Matthew D. Sinclair, Srikant Bharadwaj, Alexandru Dutu, Anthony Gutierrez, Onur Kayiran, Michael LeBeane, Brandon Potter, Sooraj PuthoorIISWC 2019

Abstract: In recent years, machine intelligence (MI) applications have emerged as a major driver for the computing industry. Optimizing these workloads is important but complicated. As memory demands grow and data movement overheads increasingly limit performance, determining the best GPU caching policy to use for a diverse range of MI workloads represents one important challenge. To study this, we evaluate 17 MI applications and characterize their behaviors using a range of GPU caching strategies. In our evaluations, we find that the choice of caching policy in GPU caches involves multiple performance trade-offs and interactions, and there is no one-size-fits-all GPU caching policy for MI workloads. Based on detailed simulation results, we motivate and evaluate a set of cache optimizations that consistently match the performance of the best static GPU caching policies.

Introduction

As machine intelligence (MI) becomes the primary driver for the computing industry, hardware designers are racing to optimize GPUs for these workloads. Traditionally, GPUs were designed for high-throughput graphics, prioritizing bandwidth over cache reuse. However, modern MI workloads (like CNNs and RNNs) have complex, diverse memory demands.

The industry is moving toward "tightly coupled" systems where CPUs and GPUs share a unified memory space. In these systems, choosing a caching policy is a minefield. If you cache everything, you might benefit from data reuse, but you risk "cache stalls" (where the system hangs waiting for a cache line to open up) and "DRAM row locality disruption" (where the irregular timing of cache write-backs makes the main memory much less efficient). The challenge is that some MI layers benefit significantly from caching, while others are actively slowed down by it.

Methods and System Architecture

The researchers used the AMD gem5 APU simulator to evaluate 17 different MI applications. The simulated architecture features a multi-level cache hierarchy where both the CPU and GPU share access to High Bandwidth Memory (HBM).

GPU and CPU cache hierarchy in the simulated APU system.

They first characterized how these apps performed under three static policies:

  1. Uncached: All loads and stores bypass the GPU caches.
  2. CacheR: Only read data is cached.
  3. CacheRW: Both reads and writes are cached (with writes coalesced at the L2 level).

After identifying specific overheads, they proposed three cooperative microarchitectural optimizations:

  • Allocation Bypass (AB): Bypasses the cache if a request would cause a stall due to all lines in a set being busy.
  • Row Locality-Aware Cache Rinsing (CR): Triggers a write-back of all dirty blocks belonging to a specific DRAM row when one is evicted, improving memory efficiency.
  • PC-Based L2 Bypassing (PCby): Uses the Program Counter (PC) to predict if an instruction benefits from reuse; if not, it bypasses the cache to avoid congestion.

Workload Characterization

The study evaluated 17 MI benchmarks from three major suites: DNNMark (individual layers like Pooling and Softmax), DeepBench (RNN training/inference and matrix multiplications), and MIOpen-benchmark (real-world AMD kernels). These benchmarks cover a wide spectrum of operations, from simple element-wise activations to complex, compute-heavy recurrent layers.

Compute bandwidth (GVOPS) across the 17 evaluated MI kernels.

Based on their behavior, the authors categorized MI workloads into three "tribes":

  • Memory Insensitive: Compute-bound tasks (like large matrix multiplies) where cache policy has minimal impact.
  • Reuse Sensitive: Tasks (like RNNs and Fully Connected layers) that see massive performance gains from caching.
  • Throughput Sensitive: Tasks (like simple Activations) where caching actually hurts performance by introducing latency and stalls.

Key Results

  • Static Policy Variance: Enabling read/write caching (CacheRW) improved performance for some layers by 29% but caused a 24% slowdown in others compared to bypassing the cache entirely.
  • Optimization Success: The combined adaptive strategy (CacheRW-PCby) successfully mitigated the downsides of caching. It matched or exceeded the performance of the "best" static policy for nearly every workload tested.
  • Memory Demand Reduction: For reuse-sensitive workloads, read caching reduced requests reaching DRAM by up to 93%, while write caching reduced them by up to 71%.
  • Stall Reduction: The Allocation Bypass (AB) optimization significantly reduced cache stalls, particularly when combined with the other proposed techniques.

Conclusion and Future Work

While caching can boost performance through data reuse, it is a double-edged sword that can disrupt DRAM row locality and introduce pipeline stalls. This research demonstrates that adaptive microarchitectural optimizations—specifically PC-based reuse prediction—can effectively navigate these trade-offs.

Future work could explore "cross-layer" optimizations where software frameworks (like TensorFlow or PyTorch) pass hints to the hardware about data cacheability. Additionally, as systems move toward exascale computing with deeper cache hierarchies, more sophisticated adaptive policies will be required to maintain efficiency across increasingly complex MI workloads.

Summary updated

BibTeX
@inproceedings{alsop2019optimizing,
  author = {Johnathan Alsop and Xianwei Zhang and Tsung Tai Yeh and Bradford M. Beckmann and Matthew D. Sinclair and Srikant Bharadwaj and Alexandru Dutu and Anthony Gutierrez and Onur Kayiran and Michael LeBeane and Brandon Potter and Sooraj Puthoor},
  title = {{Optimizing GPU Cache Policies for MI Workloads}},
  booktitle = {IISWC},
  year = {2019},
  url = {https://openreview.net/forum?id=DtRDWHKT2c},
}
Figure