老狗学新把戏:通过自动化代码翻译将遗留代码移植到异构计算架构
Teaching An Old Dog New Tricks: Porting Legacy Code to Heterogeneous Compute Architectures With Automated Code Translation
AI总结:
本文提出一种自动化代码翻译方法,将遗留Fortran多重网格求解器移植到GPU,通过编译时解析和Loopy转译,实现2-3倍单节点及6倍多节点加速。
摘要:
遗留代码在科学模拟中广泛使用;它们经过充分测试,且使用它们投入了大量时间。然而,一个挑战是采用新的、有时不兼容的计算范式,例如GPU硬件。在本文中,我们探索使用自动化代码翻译,使遗留的多重网格求解器代码能够在GPU上执行,而无需大量时间投入,并避免对代码库进行侵入性修改。我们开发了一个薄的可重用翻译层,在编译时解析Fortran 2003,与现有库Loopy接口,将其转译为C++/GPU代码,然后由我们创建的自定义MPI运行时系统管理。通过这种低投入的方法,我们能够实现相对于整个CPU插槽约2-3倍的加速,在多节点设置中实现6倍的加速。
英文摘要:
Legacy codes are in ubiquitous use in scientific simulations; they are well-tested and there is significant time investment in their use. However, one challenge is the adoption of new, sometimes incompatible computing paradigms, such as GPU hardware. In this paper, we explore using automated code translation to enable execution of legacy multigrid solver code on GPUs without significant time investment and while avoiding intrusive changes to the codebase. We developed a thin, reusable translation layer that parses Fortran 2003 at compile time, interfacing with the existing library Loopy to transpile to C++/GPU code, which is then managed by a custom MPI runtime system that we created. With this low-effort approach, we are able to achieve a payoff of an approximately 2-3x speedup over a full CPU socket, and 6x in multi-node settings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。