一种新型Stencil并行算法研究与优化实现
批准号:
62072431
项目类别:
面上项目
资助金额:
56.0 万元
负责人:
袁良
依托单位:
学科分类:
系统软件、数据库与工业软件
结题年份:
2024
批准年份:
2020
项目状态:
已结题
项目参与者:
袁良
中文摘要
Stencil是科学工程计算及其他应用中一个重要的计算问题,是十三个伯克利核心计算模式之一,几十年来高性能计算和编译技术等社区已提出了大量高效算法,但仍未清晰揭示Stencil问题的本质数学结构。本项目采取一种全新的技术路线,从研究能够描述Stencil最为核心的数据依赖关系的分块类型和相关方法出发,沿着算法即分块堆砌这一视角,利用空间密铺等数学工具,提出一种新Stencil并行分块算法,能清晰揭示Stencil问题的数学结构;在算法局部性分析方面,提出一种全新的、更为简洁的Stencil分块算法缓存复杂度分析方法,证明本项目所提新算法具有更优的缓存复杂度;在程序局部性优化方面,针对程序热点数据采用申请人提出新模型开展分析,进一步指导程序局部性优化实现并适应多存储层次;利用向量化、计算重用优化、数据高效布局以及自适应调优等技术实现一个高性能Stencil软件包,性能达到国际领先水平。
英文摘要
Stencil computations represent a very common class of computational problem in scientific, engineering and other applications. It is identified as one of the thirteen Berkeley motifs. The high performance and compiler communities have exhaustively studied stencils and proposed a large number of algorithms. However, none of them reveals the fundamental mathematical structure of the Stencil problem. This project adopts a whole new approach. We study the basic blocks and related methods that capture the critical data dependences of the Stencil definition. From the view that a Stencil algorithm is a stacking of blocks, we utilize the space tessellation technique to derive a new algorithm, which clearly exhibits the mathematical structure of the Stencil problem. We then propose a new method of cache complexity for stencil algorithms and prove that our new algorithm achieves a better theoretical result compared with existing algorithms. We use the new proposed Footmark model to guide the program optimization of better locality and implementation on multi-level caches by focusing on the hot data set of the program. With vectorization, computational reuse, efficient data layout, auto-tuning and other implementation techniques, we finally implement a high performance software package and beat state-of-the-art counterparts.
课题组在基金委面上项目支持下,根据课题年度计划安排,在Stencil计算优化方面取得了一系列研究进展,相关成果发表CCF A类论文5篇,获得北京市自然科学二等奖一项,获得CCF A类会议最佳论文奖一项。项目主要成果如下: 1. 提出一种将向量化范围扩展到迭代空间中的时间维度Stencil向量化方法,解决了Stencil向量化数据冲突问题。2. 提出了一种高效的stencil计算折叠策略和相应的向量化方案,以在时间迭代空间中减少冗余计算、提高寄存器数据利用率。3. 提出了面向国产大气环流模式IAP-AGCM的百万核可扩展三维跳点Stencil差分算法AGCM-3DLF。针对基于有限差分法离散化的IAP-AGCM的大规模应用模拟中,分析其物理模型复杂、通信密集以及负载不均等特点,设计了一种新的自适应跳点Stencil差分格式,与三维进程网格并行剖分相结合;并在国产超算上,对其Stencil计算热点采取了异构混合并行的细粒度优化,以扩展至大规模并行并提升执行效率。使用AGCM3D-LF的大规模数值模拟,实现了更好的负载均衡,提升了并行效率与模拟的绝对执行速度。在超级计算机“东升一号”上进行的实验结果显示,25KM分辨率模式扩展至全机20WCPU核;在“神威·太湖之光”超级计算机上进行的测试结果显示,25KM分辨率模式可扩展至106万核;同等规模的模拟速度和效率均达到国际先进水平。4. 首次系统定义了stencil向量化过程中在时空全维度上的冲突问题,即Vector-Data Conflict的单维空间冲突和Vector-Dimension Conflict的多维空间冲突,设计提出了Jigsaw这一新颖的向量化stencil计算方法,通过基于lane的蝶形向量化LBV,基于SVD分解的维度扁平化SDF和基于迭代的时间步融合化ITM,在时空全维度上减少了向量冲突的产生。相比于最先进的向量化技术,Jigsaw在各种stencil内核上实现了平均2.31x,最大3.07x的性能提升。
众核处理器上并行稠密矩阵计算关键技术研究
-
批准号:61402441
-
项目类别:青年科学基金项目
-
资助金额:24.0万元
-
批准年份:2014
-
负责人:袁良
-
依托单位:
国内基金
海外基金