计算机科学与探索 1673-9418/2019/ 13(02)-0181-14
Journal of Frontiers of Computer Science and Technology doi: 10.3778/j.issn. 1673-9418.1712006
基于空间密铺的并行Stencil 算法*
1,2+ 1 1 1,2
郭 鹏 ,袁 良 ,张云泉 ,黄 珊
1. 中国科学院 计算技术研究所 计算机体系结构国家重点实验室,北京 100190
2. 中国科学院大学 计算机与控制学院,北京 100049
+ 通讯作者 E-mail: guopeng@
摘 要:Stencil 计算是一种科学和工程应用中常见的循环模式,而分块技术是一种提高数据局部性和并行性的
强大转换方法。与以往直接对整个迭代空间进行分块的分块技术不同,提出了一种新的两层密铺分块的并行
算法。首先,利用不同分块密铺数据空间;然后,所有分块沿时间维度扩展密铺迭代空间。该算法有以下优
点:(1)最大化并发执行;(2 )无冗余计算;(3 )简洁的循环条件;(4 )适应Stencil 不同的尺寸、形状、阶数和边界
条件。实验结果表明,对于3D27p Stencil ,非周期边界的性能比Pluto 高12% ,周期边界的性能比Pochoir 最高
提升40% 。
关键词:Stencil 计算;空间密铺;分块方法
文献标志码:A 中图分类号:TP301
郭鹏, 袁良, 张云泉, 等. 基于空间密铺的并行Stencil 算法[J]. 计算机科学与探索, 2019, 13(2): 181-194.
GUO P, YUAN L, ZHANG Y Q, et al. Parallel Stencil algorithm based on tessellating[J]. Journal of Frontiers of
Computer Science and Technology, 2019, 13(2): 181-194.
Parallel Stencil Algorithm Based on Tessellating
1,2+ 1 1 1,2
GUO Peng , YUAN Liang , ZHANG Yunquan , HUANG Shan 索
1. State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences,
Beijing 100190, China 探
2. School of Computer and Control Engineering, University of Chinese Academy of Sciences, Beijing 100049, China
与
Abstract: Stencil computations represent a very common class of nested loops in scientific and engineering
学
applications. The exhaustively studied tiling is one of the most powerful transformation techniques to explore the
g
r
data locality and parallelism. Unli