Citation: | Ma Zhaojia, Shao En, Di Zhanyuan, Ma Lixian. Porting and Parallel Optimization of Common Operators Based on Heterogeneous Programming Models[J]. Journal of Computer Research and Development, 2025, 62(4): 1017-1032. DOI: 10.7544/issn1000-1239.202330869 |
As the fundamental computing component in constructing large-scale supercomputing systems, GPUs are undergoing architectural diversity and heterogeneity. GPU accelerators from various chip manufacturers exhibit significant variations in their architectural designs. Accelerator diversity and programming model diversity are important technical trends for building large-scale supercomputing systems. Diverse accelerators require developers to provide high-performance software for multiple hardware platforms, resulting in software duplication. To reduce the cost of duplication, the unified programming model SYCL (system-wide compute language) adapts to multiple hardware platforms, but SYCL’s performance on different hardware is not as good as the native programming model of the platform, and SYCL’s performance needs to be further optimized. In order to be able to apply the mature and complete CUDA (compute unified device architecture) programming ideas and high-performance programs to SYCL, it is necessary to discuss the performance of high-performance CUDA programs ported to SYCL on multiple platforms and the ideas for further optimization. Based on software-hardware co-design, we propose paraTRANS: a common operator optimization system for the code migration process of cross-heterogeneous programming model SYCL, and give the optimization methods for the migrated SYCL GEMM (general matrix multiplication) in different scenarios. We evaluate the performance of SYCL GEMM optimized by paraTRANS, which can achieve 96.95% of CUDA’s FLOPS on the original NVIDIA RTX 3090, and 100.47% of CUDA’s hardware peak performance percentage on AMD MI100, both close to the level before migration. This paper provides ideas for porting high-performance CUDA code to SYCL and further optimization.
[1] |
Schneider D. The exascale era is upon us: The frontier supercomputer may be the first to reach 1, 000, 000, 000, 000, 000, 000 operations per second[J]. IEEE Spectrum, 2022, 59(1): 34−35 doi: 10.1109/MSPEC.2022.9676353
|
[2] |
Brodtkorb A R, Dyken C, Hagen T R, et al. State-of-the-art in heterogeneous computing[J]. Scientific Programming, 2010, 18(1): 1−33 doi: 10.1155/2010/540159
|
[3] |
Munshi A. The openCL specification[C/OL]//Proc of the 21st IEEE Hot Chips Symp (HCS). Piscataway, NJ: IEEE, 2009[2023-04-19]. http://ieeexplore.ieee.org/document/7478342
|
[4] |
Heroux M A, McInnes L C, Thakur R, et al. ECP software technology capability assessment report[R/OL]. 2020[2023-04-23]. https://doi.org/10.2172/1760096
|
[5] |
Intel. Intel/LLVM: Intel staging area for llvm.org contribution[CP/OL]. (2023-04-19)[2023-04-19]. https://github.com/intel/llvm
|
[6] |
AMD ROCm Software. HIPIFY[CP/OL]. (2023-06-26)[2023-06-27]. https://github. com/ROCm-Developer-Tools/HIPIFY
|
[7] |
Intel. Migrate CUDA* to DPC++ code: Intel DPC++ compatibility tool[EB/OL]. [2023-07-07]. https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compatibility-tool.html
|
[8] |
Zhai Yujia. How to optimize SGEMM on NVIDIA GPUs[CP/OL]. (2023-04-19)[2023-04-21]. https://github.com/yzhaiustc/Optimizing-SGEMM-on-NVIDIA-Turing-GPUs
|
[9] |
Baidu Research. DeepBench[CP/OL]. (2023-06-28)[2023-07-04]. https: //github. com/baidu-research/DeepBench
|
[10] |
Castaño G, Faqir-Rhazoui Y, García C, et al. Evaluation of Intel’s DPC++ compatibility tool in heterogeneous computing[J]. Journal of Parallel and Distributed Computing, 2022, 165: 120−129 doi: 10.1016/j.jpdc.2022.03.017
|
[11] |
Jin Zheming, Vetter J S. Performance portability study of epistasis detection using SYCL on NVIDIA GPU[C/OL]//Proc of the 13th ACM Int Conf on Bioinformatics, Computational Biology and Health Informatics. New York: ACM, 2022[2023-04-23]. https://dl.acm.org/doi/10.1145/3535508.3545591
|
[12] |
Christgau S, Steinke T. Porting a legacy cuda stencil code to oneapi[C]//Proc of the 34th IEEE Int Parallel and Distributed Processing Symp Workshops (IPDPSW). Piscataway, NJ: IEEE, 2020: 359−367
|
[13] |
Hagerty N, Vergara V G M, Tharrington A. Studying performance portability of lammps across diverse gpu-based platforms[R/OL]. 2022[2023-04-23]. https://doi.org/10.1002/cpe.7895
|
[14] |
Jin Zheming, Vetter J S. Understanding performance portability of Bioinformatics applications in SYCL on an NVIDIA GPU[C]//Proc of the 16th IEEE Int Conf on Bioinformatics and Biomedicine (BIBM). Piscataway, NJ: IEEE, 2022: 2190−2195
|
[15] |
Deakin T, McIntosh-Smith S. Evaluating the performance of HPC-style SYCL applications[C/OL]//Proc of the 8th Int Workshop on OpenCL. New York: ACM, 2020[2023-04-19]. https://dl.acm.org/doi/10.1145/3388333.3388643
|
[16] |
Jin Zheming, Vetter J S. Evaluating nonuniform reduction in HIP and SYCL on GPUs[C]//Proc of the 8th Int Workshop on Data Analysis and Reduction for Big Scientific Data (DRBSD). Piscataway, NJ: IEEE, 2022: 37−43
|
[17] |
Volokitin V, Bashinov A, Efimenko E, et al. High performance implementation of Boris particle pusher on DPC++. A first look at oneAPI[C]//Proc of the 14th Int Conf on Parallel Computing Technologies. Berlin: Springer, 2021: 288−300
|
[18] |
Costanzo M, Rucci E, Sánchez C G, et al. Assessing opportunities of SYCL and Intel oneAPI for biological sequence alignment[J]. arXiv preprint, arXiv: 2211.10769, 2022
|
[19] |
Da Silva H C, Pisani F, Borin E. A comparative study of SYCL, OpenCL, and OpenMP[C]//Proc of the 2016 Int Symp on Computer Architecture and High Performance Computing Workshops (SBAC-PADW). Piscataway, NJ: IEEE, 2016: 61−66
|
[20] |
Tsai Y M, Cojean T, Anzt H. Porting sparse linear algebra to Intel GPUs[C]//Proc of the 27th European Conf on Parallel Processing. Berlin: Springer, 2021: 57−68
|
[21] |
王一超,林新华,蔡林金,等. 太湖之光上利用OpenACC移植和优化GTC-P[J]. 计算机研究与发展,2018,55(4):875−884 doi: 10.7544/issn1000-1239.2018.20160871
Wang Yichao, Lin Xinhua, Cai Linjin, et al. Porting and optimizing GTC-P on TaihuLight supercomputer with OpenACC[J]. Journal of Computer Research and Development, 2018, 55(4): 875−884 (in Chinese) doi: 10.7544/issn1000-1239.2018.20160871
|
[1] | Jin Dongming, Jin Zhi, Chen Xiaohong, Wang Chunhui. ChatModeler: A Human-Machine Collaborative and Iterative Requirements Elicitation and Modeling Approach via Large Language Models[J]. Journal of Computer Research and Development, 2024, 61(2): 338-350. DOI: 10.7544/issn1000-1239.202330746 |
[2] | Wang Juanjuan, Wang Hongan. Multi-Agent Multi-Criticality Scheduling Based Self-Healing System of Power Grid[J]. Journal of Computer Research and Development, 2017, 54(4): 720-730. DOI: 10.7544/issn1000-1239.2017.20161026 |
[3] | He Wenbin, Liu Qunfeng, Xiong Jinzhi. The Error Theory of Polynomial Smoothing Functions for Support Vector Machines[J]. Journal of Computer Research and Development, 2016, 53(7): 1576-1585. DOI: 10.7544/issn1000-1239.2016.20148462 |
[4] | He Wangquan, Wei Di, Quan Jianxiao, Wu Wei, Qi Fengbin. Dynamic Task Scheduling Model and Fault-Tolerant via Queuing Theory[J]. Journal of Computer Research and Development, 2016, 53(6): 1271-1280. DOI: 10.7544/issn1000-1239.2016.20148445 |
[5] | Zhao Yu, Wang Yadi, Han Jihong, Fan Yudan, and Zhang Chao. A Formal Model for Cryptographic Protocols Based on Planning Theory[J]. Journal of Computer Research and Development, 2008, 45(9). |
[6] | Shi Jin, Lu Yin, and Xie Li. Dynamic Intrusion Response Based on Game Theory[J]. Journal of Computer Research and Development, 2008, 45(5): 747-757. |
[7] | Li Ye, Cai Yunze, Yin Rupo, Xu Xiaoming. Support Vector Machine Ensemble Based on Evidence Theory for Multi-Class Classification[J]. Journal of Computer Research and Development, 2008, 45(4): 571-578. |
[8] | Lin Jianning, Wu Huizhong. Research on a Trust Model Based on the Subjective Logic Theory[J]. Journal of Computer Research and Development, 2007, 44(8): 1365-1370. |
[9] | He Lijian and Zhang Wei. An Agent Organization Structure for Solving DCOP Based on the Partitions of Constraint Graph[J]. Journal of Computer Research and Development, 2007, 44(3). |
[10] | Mu Kedian and Lin Zuoquan. Symbolic Dempster-Shafer Theory[J]. Journal of Computer Research and Development, 2005, 42(11): 1833-1842. |