华南理工大学学报(自然科学版) ›› 2024, Vol. 52 ›› Issue (2): 13-22.doi: 10.12141/j.issn.1000-565X.230066

• 计算机科学与技术 • 上一篇    下一篇

基于鲲鹏和昇腾异构平台的单节点HPL-AI设计与优化

吴昊天1,2 任长青1 陆璐1 徐鹏翔3 杨凯3   

  1. 1.华南理工大学 计算机科学与工程学院, 广东 广州 510006
    2.郑州信大先进技术研究院, 河南 郑州 450001
    3.鹏城国家实验室, 广东 深圳 518000
  • 收稿日期:2023-02-27 出版日期:2024-02-25 发布日期:2023-05-22
  • 作者简介:吴昊天(1980-),男,博士,副教授,主要从事可逆信息隐藏、隐私计算、图像处理、高性能计算和区块链研究。E-mail:wuht@scut.edu.cn
  • 基金资助:
    广东省自然科学基金资助项目(2021A1515011798);河南省网络空间态势感知重点实验室开放课题(HNTS2022017)

Design and Optimization of Single-Node HPL-AI Benchmark for a Heterogeneous Platform Composed of Kunpeng and Ascend

WU Haotian1,2 REN Changqing1 LU Lu1 XU Pengxiang3 YANG Kai3   

  1. 1.School of Computer Science and Engineering,South China University of Technology,Guangzhou 510006,Guangdong,China
    2.Zhengzhou Xinda Institute of Advanced Technology,Zhengzhou 450001,Henan,China
    3.Peng Cheng Laboratory,Shenzhen 518000,Guangdong,China
  • Received:2023-02-27 Online:2024-02-25 Published:2023-05-22
  • About author:吴昊天(1980-),男,博士,副教授,主要从事可逆信息隐藏、隐私计算、图像处理、高性能计算和区块链研究。E-mail:wuht@scut.edu.cn
  • Supported by:
    the Natural Science Foundation of Guangdong Province(2021A1515011798);the Open Foundation of Henan Key Laboratory of Cyberspace Situation Awareness(HNTS2022017)

摘要:

鉴于低精度浮点运算拥有更快的运算速度,越来越多的高性能应用采用混合精度方案进行加速,而同样采用该方案来加速的AI(人工智能)大模型也受到广泛关注。最近,HPL-AI(High Performance LINPACK for Accelerator Introspection)基准测试被提出,用于评估高性能系统的混合精度运算性能。针对该基准测试,本研究在鲲鹏和昇腾异构平台上设计并优化了单节点HPL-AI基准测试的实现。其主要通过循环任务分配的策略将任务均匀地分配给AI处理器以平衡AI处理器的负载;通过带间隔值的任务分配策略提高数据传输的连续性来减少CPU和AI处理器之间的数据传输时间;在不影响计算精度的情况下,通过取消数据缩放的策略来减少CPU侧的计算量。最终实验结果表明:当间隔值为8时,HPL-AI基准测试的混合精度浮点运算速度最快;同时,取消数据缩放不会对HPL-AI基准测试的结果精度产生影响;在鲲鹏和昇腾异构平台上,与非优化的HPL-AI基准测试方法相比,本研究提出的优化策略使混合精度浮点运算速度提升了29%左右,为单节点HPL-AI基准测试的进一步优化和部署多节点HPL-AI基准测试奠定了坚实的基础。

关键词: 鲲鹏, 昇腾, 异构平台, 基准测试, 高性能计算, 混合精度

Abstract:

Given the faster speed of low-precision floating point operations, more and more high-performance applications are using hybrid precision solutions to accelerate.The large AI (artificial intelligence) models that use this scheme to accelerate has also received wide attention. Recently, the HPL-AI (High Performance LINPACK for Accelerator Introspection) benchmark has been proposed to evaluate the mixed-precision computing performance of high-performance systems. For this benchmark test, this study designed and optimized the implementation of single-node HPL-AI benchmark test on Kunpeng and Ascend heterogeneous platforms. In order to balance the load of the AI processor, the tasks were evenly distributed to the AI processors through the cyclic task allocation strategy. The task allocation strategy with interval value was used to improve the continuity of data transmission to reduce the data transmission time between CPU and AI processor. Without affecting the calculation accuracy, the computation on the CPU side was reduced by the strategy of canceling the data scaling. The final experimental results show that the HPL-AI benchmark has the fastest mixed-precision floating-point arithmetic speed when the interval value is 8; at the same time, unscaling the data does not affect the accuracy of the HPL-AI benchmark results. Compared with the non-optimized HPL-AI benchmark implementation on the heterogeneous platform of Kunpeng and Ascend, the optimization strategy proposed in this paper improves the mixed-precision floating-point arithmetic speed by about 29%, which lays a solid foundation for the further optimization of single-node HPL-AI benchmark and the deployment of multi-node HPL-AI benchmark.

Key words: Kunpeng, Ascend, heterogeneous platform, benchmark test, high performance computing, mixed precision

中图分类号: