29004

swCUDA: Auto parallel code translation framework from CUDA to ATHREAD for new generation sunway supercomputer

Maoxue Yu, Guanghao Ma, Zhuoya Wang, Shuai Tang, Yuhu Chen, Yucheng Wang, Yuanyuan Liu, Dongning Jia, Zhiqiang Wei
Network and Information Center, Qingdao Marine Science and Technology Center, Qingdao, China
CCF Transactions on High Performance Computing, 2024

@article{yu2024swcuda,

   title={swCUDA: Auto parallel code translation framework from CUDA to ATHREAD for new generation sunway supercomputer},

   author={Yu, Maoxue and Ma, Guanghao and Wang, Zhuoya and Tang, Shuai and Chen, Yuhu and Wang, Yucheng and Liu, Yuanyuan and Jia, Dongning and Wei, Zhiqiang},

   journal={CCF Transactions on High Performance Computing},

   pages={1–20},

   year={2024},

   publisher={Springer}

}

Download Download (PDF)   View View   Source Source   

580

views

Since specific hardware characteristics and low-level programming model are adapted to both NVIDIA GPU and new generation Sunway architecture, automatically translating mature CUDA kernels to Sunway ATHREAD kernels are realistic but challenging work. To address this issue, swCUDA, an auto parallel code translation framework is proposed. To that end, we create scale afne translation to transform CUDA thread hierarchy to Sunway index, directive based memory hierarchy and data redirection optimization to assign optimal memory usage and data stride strategy, directive based grouping-calculation-asynchronous-reduction (GCAR) algorithm to provide general solution for random access issue. swCUDA utilizes code generator ANTLR as compiler frontend to parse CUDA kernel and integrate novel algorithms in the node of abstracted syntax tree (AST) depending on directives. Automatically translation is performed on the entire Polybench suite and NBody simulation benchmark. We get an average 40x speedup compared with baseline on the Sunway architecture, average speedup of 15x compared to x86 CPU and average 27 percentage higher than NVIDIA GPU. Further, swCUDA is implemented to translate major kernels of the real world application Gromacs. The translated version achieves up to 17x speedup.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2024 hgpu.org

All rights belong to the respective authors

Contact us: