计算物理 ›› 2024, Vol. 41 ›› Issue (1): 52-63.DOI: 10.19596/j.cnki.1001-246x.8777

• 面向超级计算机的性能优化技术与数值并行算法专刊 • 上一篇    下一篇

SEMD:一种面向实际数值模拟软件的跨平台自动性能优化编程工具

张鹏1,2(), 张爱清1,2,*(), 莫则尧1,3, 王景焘1,2   

  1. 1. 中国工程物理研究院高性能数值模拟软件中心, 北京 100088
    2. 北京应用物理与计算数学研究所, 北京 100094
    3. 中国工程物理研究院, 四川 绵阳 621900
  • 收稿日期:2023-06-09 出版日期:2024-01-25 发布日期:2024-02-05
  • 通讯作者: 张爱清
  • 作者简介:张鹏, 男, 博士, 副研究员, 研究方向为高性能计算、数值软件性能优化, E-mail: zhang_peng@iapcm.ac.cn

SEMD: A Cross-platform Automatic Performance Optimization Programming Tool for Real Numerical Simulation Software

Peng ZHANG1,2(), Aiqing ZHANG1,2,*(), Zeyao MO1,3, Jingtao WANG1,2   

  1. 1. Software Center for High Performance Numerical Simulation, China Acedemy of Engineering Physiscs, Beijing 100088, China
    2. Institute of Applied Physics and Computational Mathematics, Beijing 100094, China
    3. China Academy of Engineering Physics, Mianyang, Sichuan 621900, China
  • Received:2023-06-09 Online:2024-01-25 Published:2024-02-05
  • Contact: Aiqing ZHANG

摘要:

针对手工软件性能优化缺乏可复用性和可移植性的问题, 设计实现一种面向实际数值模拟软件的跨平台自动性能优化编程工具SEMD (Single element-based computing multiple data)。SEMD采用数值模拟领域基于网格的高层语义对数值计算循环进行抽象, 完全屏蔽底层硬件特征和性能优化实现, 使得基于其编写的数值计算子程序能够自动实现跨平台性能可移植。典型算例测试结果显示: 在X86、ARM、GPU三种不同架构的处理器上, SEMD的整体性能优化效果超过国际上的同类产品。此外, SEMD在结构、流体、电磁等领域实际数值模拟软件的研制中也得到了初步应用, 支撑4款软件热点数值计算子程序平均性能提升164%.

关键词: 跨平台自动性能优化, 性能可移植, 数值计算循环, 编程接口

Abstract:

Aiming at the lack of reusability and portability in the manual optimization of software, we propose and implement SEMD, a cross-platform automatic performance optimization programming tool for numerical simulation software. It abstracts numerical computing loop programming using high-level semantics, which is prevalent in the field of numerical simulation, completely shielding underlying hardware features and performance optimization implementations. Therefore, any numerical subroutines written based on SEMD can attain automatic cross-platform performance portability. Our tests demonstrate that SEMD's performance optimization effects exceed those of comparable products on three different processor architectures, including X86, ARM and GPU. Furthermore, SEMD has been successfully applied in the development of four real numerical simulation software programs in the fields of structure, fluid, and electromagnetic, resulting in an average performance improvement of 164% on hotspot subroutines.

Key words: automatic performance optimization, performance portability, numerical computing loops, programming interface

中图分类号: