Reconstructing Fine-grained Memory Reuse Structure in GPU Kernels
Yanbo Zhao, Yueming Hao, Zecheng Li, Mao Lin, Shuyin Jiao, Keren Zhou, Xu Liu, Jiajia Li
Abstract
Optimizing GPU data movement requires knowing which instructions access the same data and across which execution scopes reuse occurs. Existing profilers can attribute memory behavior to individual instructions but do not expose the reuse relations among them, while aliasing, dynamic indexing, and runtime parameters prevent static analysis from establishing these relations in general. Cycle-level simulation can reconstruct such relations, but at costs prohibitive for production workloads. We introduce two abstractions for representing this structure: Topological Distance, which labels each dynamic memory access with the smallest execution scope (thread, warp, block, or grid) containing its most recent reuse, and PCDepGraph, which organizes these labels into a PC-level graph of the kernel's memory reuse structure. Defined over logical execution scopes rather than transient hardware state, the representation remains stable across runs and GPU targets while directly indicating the sharing scope that candidate optimization mechanisms must cover. Our tool, cuVein, reconstructs PCDepGraph directly from optimized binaries, without sampling, at generally under 10x overhead. Across HPC and AI workloads on NVIDIA RTX 4090 and H100, optimizations guided by PCDepGraph eliminate up to 90.18% of memory instructions and yield up to 2.84x kernel speedup; reuse-scope distributions remain consistent across platforms, supporting that the representation captures program structure rather than transient hardware behavior.
Create a lesson
Related papers
TapeSAC: Automated, Pareto-Optimal Fine-Grained Memory Management for Large Model Training
Shared title terminology · Kaihui Ren, Yifan Zhao, Zejian Wang et al.
SubGPU Pipelining: Intra-GPU Fine-Grained Spatial Parallelism for LLM Inference
Shared title terminology · Muralidhar Andoorveedu, Marius Juston, Tingkai Liu et al.
StarMPI-SVD: Distributed-Memory Parallel Star-M Tensor SVD
Shared title terminology · Naman Pesricha, Grey Ballard, Srinivas Eswar et al.
Twindex: Index Cache Offloading with Coarse-to-Fine Selection for Long-Context Sparse-Attention Serving
Shared title terminology · Yuxuan Xia, Jiakun Fan, Han Meng et al.
Neural Memory Orchestration
Shared title terminology · Michael Zizov, Boris Morose
XM-Sparse: High-Throughput Sparse-Attention LLM Serving over Scale-up Memory Pools
Shared title terminology · Yijun Sun, Xudong Liao, Zhuobin Huang et al.