Jefferson Lab > CIO > IR
Privacy and Security Notice

Publications

Publication Information

Title 24 MemHC: An Optimized GPU Memory Management Framework for Accelerating Many-body Correlation
Authors Qihan Wang, Zhen Peng, Bin Ren, Jie Chen, Robert Edwards
JLAB number JLAB-CST-22-3602
LANL number (None)
Other number DOE/OR/23177-5487
Document Type(s) (Journal Article) 
Associated with EIC: No
Supported by Jefferson Lab LDRD Funding: No
Funding Source: Nuclear Physics (NP)
 

Journal
Compiled for ACM Transactions on Architecture and Code Optimization
Volume 19
Issue 2
Page(s) 24
Refereed
Publication Abstract: The many-body correlation function is a fundamental computation kernel in modern physics computing applications, e.g., Hadron Contractions in Lattice quantum chromodynamics (QCD). This kernel is both computation and memory intensive, involving a series of tensor contractions, and thus usually runs on accelerators like GPUs. Existing optimizations on many-body correlation mainly focus on individual tensor contractions (e.g., cuBLAS libraries and others). In contrast, this work discovers a new optimization dimension for many-body correlation by exploring the optimization opportunities among tensor contractions. More specifically, it targets general GPU architectures (both NVIDIA and AMD) and optimizes many-body correlation?s memory management by exploiting a set of memory allocation and communication redundancy elimination opportunities: first, GPU memory allocation redundancy: the intermediate output frequently occurs as input in the subsequent calculations; second, CPU-GPU communication redundancy: although all tensors are allocated on both CPU and GPU, many of them are used (and reused) on the GPU side only, and thus, many CPU/GPU communications (like that in existing Unified Memory designs) are unnecessary; third, GPU oversubscription: limited GPU memory size causes oversubscription issues, and existing memory management usually results in near-reuse data eviction, thus incurring extra CPU/GPU memory communications. Targeting these memory optimization opportunities, this article proposes MemHC, an optimized systematic GPU memory management framework that aims to accelerate the calculation of many-body correlation functions utilizing a series of new memory reduction designs. These designs involve optimizations for GPU memory allocation, CPU/GPU memory movement, and GPU memory oversubscription, respectively. More specifically, first, MemHC employs duplication-aware management and lazy release of GPU memories to corresponding host managing for better data reusability. Second, it implements data reorganization and on-demand synchronization to eliminate redundant (or unnecessary) data transfer. Third, MemHC exploits an optimized Least Recently Used (LRU) eviction policy called Pre-Protected LRU to reduce evictions and leverage memory hits. Additionally, MemHC is portable for various platforms including NVIDIA GPUs and AMD GPUs. The evaluation demonstrates that MemHC outperforms unified memory management by 2.18× to 10.73×. The proposed Pre-Protected LRU policy outperforms the original LRU policy by up to 1.36× improvement.1
Experiment Numbers:
Group: Scientific Computing
Document: pdf
DOI: https://doi.org/10.1145/3506705
Accepted Manuscript: 3506705.pdf
Supporting Documents:
Supporting Datasets: