Evaluating high-dimensional integrals via deep hierarchical recurrences is a dominant cost in quantum chemistry. While CPUs manage these efficiently, GPUs suffer a critical mismatch: limited per-thread memory is quickly overwhelmed by an explosion of simultaneously live intermediate variables. As recurrence scales, this forces massive data spilling to global memory, collapsing performance into a severe memory-bound regime. We present FusionRCG, a framework that jointly optimizes computation graph structure and GPU memory mapping. Exploiting the inherent topological flexibility of recurrence graphs, using electron repulsion integrals as an example, we contribute: (1) liveness-aware graph orchestration to minimize peak live intermediates; (2) algebraic dimensionality reduction via stepwise Cartesian-to-spherical fusion, shrinking intermediate footprints by up to $7.7\times$; and (3) an adaptive multi-tier kernel architecture routing graphs across the memory hierarchy. Evaluated on NVIDIA A100 GPUs, FusionRCG achieves up to $3.09\times$ end-to-end SCF speedup over GPU4PySCF and maintains $75\%$ parallel efficiency at 64~GPUs, successfully rescuing these workloads from memory-bound limits.
翻译:通过深层递归层级评估高维积分是量子化学中的主要计算成本。尽管CPU能高效处理此类运算,但GPU面临关键性失配问题:有限的每线程内存被海量瞬时活跃中间变量的激增迅速淹没。随着递归规模扩大,这迫使大量数据溢出至全局内存,导致性能陷入严重的内存受限状态。我们提出FusionRCG框架,该框架联合优化计算图结构与GPU内存映射。利用递归图固有的拓扑灵活性,以电子排斥积分为例,我们贡献了:(1) 活性感知的图编排方法,最小化峰值活跃中间变量;(2) 通过逐步笛卡尔-球谐融合实现的代数降维,将中间变量占用空间压缩高达$7.7\times$;(3) 自适应多层级内核架构,在内存层级间路由计算图。在NVIDIA A100 GPU上的评估表明,FusionRCG相较GPU4PySCF可实现高达$3.09\times$的端到端自洽场加速,并在64块GPU上保持$75\%$的并行效率,成功将此类工作负载从内存限制中解放。