期刊文献+

基于数据局部性的循环分块选择算法

Tile Selection Algorithm Based on Data Locality
下载PDF
导出
摘要 现有的多面体编译框架(如Pluto,LLVM/Polly和GCC/Graphite)在进行循环分块时,都采用了固定分块大小,无法充分发挥不同硬件的缓存特性,导致存在较大的性能差异。针对这一问题,涌现了许多基于多级缓存和数据局部性的循环分块算法,但这些算法往往只能优化特定循环程序或者缺乏综合考虑,不适合移植到通用编译器中。文中提出了一种基于数据局部性的循环分块选择算法,该算法不仅考虑了缓存替换策略的影响,还考虑了多核环境下的负载均衡问题。算法基于LLVM中的Polly模块实现,并选用Pluto和PolyBench中的部分测试用例进行单核和多核测试。实验结果表明,单核环境下,相比LLVM/Polly的默认分块方法,该算法在两种硬件平台下分别获得了平均2.03和2.05的加速比,且在多核环境下具有良好的并行可扩展性。 The existing polyhedral compilation frameworks(such as Pluto,LLVM/Poly and GCC/Graphite)use fixed block sizes when performing loop tiling,which cannot fully utilize the caching characteristics of different hardware,resulting in significant performance differences.In response to this issue,many loop tiling algorithms based on multi-level caching and data locality have emerged,but these algorithms often only optimize specific loop programs or lack comprehensive consideration,and are not suitable for transplantation into general compilers.This paper proposes a tile size selection algorithm based on data locality,which not only considers the impact of cache replacement strategy,but also considers the load balancing problem in multi-core environments.The algorithm is implemented based on the Polly module in LLVM,and some test cases from Pluto and PolyBench are selected for single core and multi-core testing.The experimental results show that compared to the default partitioning method of LLVM/Polly,the proposed algorithm achieves an average acceleration ratio of 2.03 and 2.05 on two hardware platforms in a single core environment,and has good parallel scalability in a multi-core environment.
作者 廖启华 聂凯 韩林 陈梦尧 谢汶兵 LIAO Qihua;NIE Kai;HAN Lin;CHEN Mengyao;XIE Wenbing(School of Computer and Artificial Intelligence,Zhengzhou University,Zhengzhou 450000,China;National Supercomputing Center in Zhengzhou,Zhengzhou University,Zhengzhou 450000,China;Wuxi Advanced Technology Research Institute,Wuxi,Jiangsu 214000,China)
出处 《计算机科学》 CSCD 北大核心 2024年第12期100-109,共10页 Computer Science
基金 2022年河南省重大科技专项(221100210600) 2022求是科研启动(自)(32213247)。
关键词 数据局部性 多面体模型 循环分块 分块大小 负载均衡 Data locality Polyhedral model Loop tiling Tile size Load balancing
  • 相关文献

参考文献5

二级参考文献97

  • 1Owens J D, Luebke D, Govindaraju N, et al. A survey of general-purpose computation on graphics hardware [J]. Computer Graphics Forum, 2007, 26(1) : 80-113.
  • 2Grosser T, Cohen A, Kelly P, et al. Split tiling for GPUs: Automatic parallelization using trapezoidal tiles [C]//Proc of the 6th Workshop on General Purpose Processor Using Graphics Processing Units. New York: ACM, 2013: 24-31.
  • 3Kaspersky K. Code Optimization: Effective Memory Usage [M]. New Delhi, India: BPB Publications, 2004.
  • 4Baghdadi R, Cohen A, Verdoolaege S, et al. Improved loop tiling based on the removal of spurious false dependences [J]. ACM Trans on Architecture and Code Optimization(TACO) Special Issue on High-Performance Embedded Architectures and Compilers, 2013, 9(4): 1-26.
  • 5Pouchet L N, Bondhugula U, Bastoul C, et al. Loop transformations: Convexity, pruning and optimization [C // Proc of the 38th ACM SIGPLAN-SIGACT Symp on Principles of Programming Languages (POPL'll). New York: ACM, 2011:549-562.
  • 6Lain M S, Wolf M E. A data locality optimizing algorithm [C] //Proc of the 12th ACM SIGPLAN Conf on Programming LangUage Design and Implementation (PLDI'91). NewYork: ACM, 1991:30-44.
  • 7Lain M D, Rothberg E, Wolf M E. The cache performance and optimizations of blocked algorithms [C] //Proc of the 4th Int Conf on Architectural Support for Programming Languages and Operating Systems. New York: ACM, 1991: 63-74.
  • 8Irigoin F, Triolet R. Supernode partitioning [C] //Proc of the 15th ACM SIGPLAN-SIGACT Syrup on Principles of Programming Languages ( POPL'88 ). New York: ACM, 1988:319-328.
  • 9Ancourt C, Irigoin F. Scanning polyhedra with DO loops [C] //Proc of the 3rd ACM SIGPLAN Syrup on Principles and Practice of Parallel Programming. New York: ACM, 1991: 39-50.
  • 10Xue Jingling. Loop Tiling for Parallelism [M]. Amsterdam, Netherlands: Kluwer Academic Publishers, 2000.

共引文献11

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部