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

A Graph-based Model for GPU Caching Problems

Lingda Li, Ari B. Hayes, Stephen A. Hackler, Eddy Z. Zhang, Mario Szegedy, Shuaiwen Leon SongarXiv 2016

Abstract: Irregular GPU applications often suffer from memory bandwidth bottlenecks due to inefficient cache utilization. This paper presents an edge-centric graph model that optimizes data sharing by partitioning computation tasks (edges) rather than data objects (vertices). By employing a novel "clone-and-connect" transformation, the complex edge-partitioning problem is mapped to a standard vertex-partitioning problem, enabling the use of high-performance libraries like METIS. Experimental results demonstrate that this approach achieves significant kernel speedups (up to 1.97x) while maintaining partitioning overheads 10x to 100x lower than traditional hypergraph methods.

The Shared Cache Challenge in Irregular Applications

Modern GPU architectures rely on small, fast L1 or shared memory caches to mitigate the latency of off-chip memory. However, irregular applications—such as computational fluid dynamics (CFD) or sparse matrix operations—exhibit unpredictable data access patterns. In these scenarios, default thread scheduling often leads to redundant memory loads, where multiple thread blocks fetch the same data independently because they lack spatial or temporal locality.

Comparison of original and optimized CFD interaction scheduling, highlighting redundant data loads.

As shown in Figure 1, original scheduling can cause the same particle data to be loaded into multiple Streaming Multiprocessors (SMs), wasting bandwidth. Existing vertex-centric models fail to capture this edge-based communication volume accurately, while hypergraph models, though precise, are too computationally expensive for runtime optimization.

The Edge-Partitioning (EP) Model

To address these limitations, the authors propose an Edge-Partitioning (EP) model. In this framework, vertices represent data objects and edges represent computational tasks requiring two data objects. The objective is to group these edges into clusters (corresponding to GPU thread blocks) to minimize the "vertex replication factor"—the number of times a data object must be loaded across different clusters. Representing tasks as edges naturally captures "data-affinity" better than traditional vertex-centric models.

The Clone-and-Connect Transformation

The core technical innovation is a transformation that allows edge partitioning to be solved using efficient vertex partitioning algorithms. This "clone-and-connect" technique involves several primary steps:

  1. Cloning: Each vertex of degree $d$ is replaced by $d$ "cloned" vertices, each connected to exactly one original edge.
  2. Connecting: These clones are then linked by "auxiliary edges" to form a path.
  3. Weighting: Original edges are given very high weights so that a standard partitioner (like METIS) will avoid cutting them, forcing it to cut only the auxiliary edges.
The five-step clone-and-connect transformation process to convert edge partitioning into vertex partitioning.

This mapping, illustrated in Figure 3, ensures that a standard partitioner will preferentially cut auxiliary edges. Cutting an auxiliary edge represents the "cost" of replicating a data object in a different cache. This approach provides a theoretical approximation bound of $(d_{max} - 1)O(\sqrt{\log m \log k})$, ensuring the solution is robust.

Evaluation and Key Results

The EP model was evaluated using the Rodinia benchmark suite and various sparse matrices from the Florida Matrix Collection. Key findings include:

  • Speed of Partitioning: The EP model is 10x to 100x faster than state-of-the-art hypergraph partitioners like PaToH and hMETIS, especially on large graphs like circuit5M.
  • Kernel Speedups: Optimized kernels showed significant performance gains, including up to a 1.97x speedup for Gaussian elimination and a 73.4% reduction in redundant particle loads for CFD.
  • Asynchronous Optimization: By running the partitioning on a separate CPU thread while the GPU executes initial iterations, the system can "hot-swap" to the optimized version mid-execution, effectively hiding the partitioning overhead.

Conclusion

The edge-centric graph model provides a powerful and efficient alternative to traditional partitioning methods for GPU caching. By transforming the problem into a vertex-centric domain, it leverages existing high-performance tools to solve complex data-affinity problems. While some trade-offs exist regarding thread occupancy, the model consistently outperforms default scheduling and simple heuristics across a wide range of irregular workloads.

Summary updated

BibTeX
@misc{li2016graph,
  author = {Lingda Li and Ari B. Hayes and Stephen A. Hackler and Eddy Z. Zhang and Mario Szegedy and Shuaiwen Leon Song},
  title = {{A Graph-based Model for GPU Caching Problems}},
  year = {2016},
  eprint = {1605.02043},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1605.02043},
}
Figure