面向Stencil计算的自动混合精度优化
DOI:
作者:
作者单位:

信息工程大学

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金(U20A20226)


Automatic Mixed Precision Optimization for Stencil Computation
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    混合精度在深度学习和精度调整与优化方面取得了许多进展,广泛的研究表明,面向Stencil计算的混合精度优化也是一个很有挑战性的方向.同时,多面体模型在自动并行化领域取得的一系列研究成果表明,该模型为循环嵌套提供很好的数学抽象,可以在其基础上进行一系列的循环变换.本文基于多面体编译技术设计并实现了一个面向Stencil计算的自动混合精度优化器,通过在中间表示层进行迭代空间划分、数据流分析和调度树转换,首次实现了源到源的面向Stencil计算的混合精度优化代码自动生成.实验表明,经过自动混合精度优化之后的代码,在减少精度冗余的基础上能够充分发挥其并行潜力,提升程序性能.以高精度计算为基准,在X86平台上最大加速比是1.76,几何平均加速比是1.15;在新一代国产申威平台上最大加速比是1.64,几何平均加速比是1.20.

    Abstract:

    Mixed precision has made many advances in deep learning and precision tuning and optimization. Extensive research shows that the mixed precision for stencil computation is also very challenging. At the same time, a series of research of polyhedral model in the field of automatic parallelization show that the model provides a good mathematical abstraction for loop nesting, a series of loop transformations can be performed on the basis of it. This paper designs and implements an automatic mixed precision optimizer for Stencil computations based on the polyhedral compilation. By performing iterative domain partitioning, data flow analysis and scheduling tree transformation on the intermediate presentation, we implement the source-to-source automatic generation of mixed precision code for stencil computation for the first time. The experiments show that the code after automatic mixed precision can give full play to its potential parallelism and improve the performance of the program on the basis of reducing precision redundancy. Taking high-precision computing as benchmark, the maximum speedup is 1.76 and the geometric average speedup is 1.15 on the X86 architecture. On the new-generation Sunway architecture, the maximum speedup is 1.64 and the geometric average speedup is 1.20.

    参考文献
    相似文献
    引证文献
引用本文
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2022-04-01
  • 最后修改日期:2022-07-22
  • 录用日期:2022-08-11
  • 在线发布日期:
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号