HyperOffload: Graph-Driven Hierarchical Memory Management for Large Language Models on SuperNode Architectures
Fangxin Liu, Qinghua Zhang, Hanjing Shen, Qinghua Zhang, Zhibo Liang, Li Jiang, Haibing Guan, Chong Bao, Xuefeng Jin
TL;DR
HyperOffload addresses the memory bottleneck of large language models by elevating remote memory accesses to first-class graph operators within MindSpore on SuperNode hardware. It introduces cache operators (Prefetch, Store, Detach) and a Graph-Driven Execution-Order Optimization to deterministically plan memory movements and hide remote latency behind computation. The framework integrates non-intrusively via MindIR and JIT graph rewriting, enabling compile-time tensor lifetime analysis and memory planning without requiring model changes. Empirical results show substantial peak memory reductions and stable performance across training and long-context inference, demonstrating the practicality of graph-level, compiler-aware memory management for next-generation AI workloads on memory-rich architectures.
Abstract
The rapid evolution of Large Language Models (LLMs) towards long-context reasoning and sparse architectures has pushed memory requirements far beyond the capacity of individual device HBM. While emerging supernode architectures offer terabyte-scale shared memory pools via high-bandwidth interconnects, existing software stacks fail to exploit this hardware effectively. Current runtime-based offloading and swapping techniques operate with a local view, leading to reactive scheduling and exposed communication latency that stall the computation pipeline. In this paper, we propose the SuperNode Memory Management Framework (\textbf{HyperOffload}). It employs a compiler-assisted approach that leverages graph-driven memory management to treat remote memory access as explicit operations in the computation graph, specifically designed for hierarchical SuperNode architectures. Unlike reactive runtime systems, SuperNode represents data movement using cache operators within the compiler's Intermediate Representation (IR). This design enables a global, compile-time analysis of tensor lifetimes and execution dependencies. Leveraging this visibility, we develop a global execution-order refinement algorithm that statically schedules data transfers to hide remote memory latency behind compute-intensive regions. We implement SuperNode within the production deep learning framework MindSpore, adding a remote memory backend and specialized compiler passes. Evaluation on representative LLM workloads shows that SuperNode reduces peak device memory usage by up to 26\% for inference while maintaining end-to-end performance. Our work demonstrates that integrating memory-augmented hardware into the compiler's optimization framework is essential for scaling next-generation AI workloads.
