[论文解读] Automated Synthesis of Divide and Conquer Parallelism
本文提出了一种自动化技术,通过自动生成正确的合并操作,并在必要时扩展原始代码以引入辅助累加器,实现对顺序代码的分治并行化。该方法采用语法引导的综合技术并结合机器可检查的正确性证明,实现了在各种基准测试中接近理想的加速比,且无运行时开销。
This paper focuses on automated synthesis of divide-and-conquer parallelism, which is a common parallel programming skeleton supported by many cross-platform multithreaded libraries. The challenges of producing (manually or automatically) a correct divide-and-conquer parallel program from a given sequential code are two-fold: (1) assuming that individual worker threads execute a code identical to the sequential code, the programmer has to provide the extra code for dividing the tasks and combining the computation results, and (2) sometimes, the sequential code may not be usable as is, and may need to be modified by the programmer. We address both challenges in this paper. We present an automated synthesis technique for the case where no modifications to the sequential code are required, and we propose an algorithm for modifying the sequential code to make it suitable for parallelization when some modification is necessary. The paper presents theoretical results for when this {\em modification} is efficiently possible, and experimental evaluation of the technique and the quality of the produced parallel programs.
研究动机与目标
- 自动化合成顺序代码中分治并行化的正确合并操作。
- 解决缺乏自然合并操作的循环并行化挑战,通过自动扩展代码引入辅助累加器。
- 为此类扩展在何时可高效实现并能自动发现提供理论基础。
- 为所有合成的合并操作生成机器可检查的正确性证明,确保在所有输入上均正确。
- 在真实世界基准上评估合成并行程序的性能与可扩展性。
提出的方法
- 使用语法引导的综合(SGS)在受限但表达能力强的搜索空间中搜索正确的合并算子。
- 定义一个形式化框架,自动为顺序循环扩展辅助累加器,以支持有效合并操作的存在。
- 利用第三同态定理及相关代数原理,指导合并函数的合成。
- 集成自动化证明生成,验证所有合成合并操作在整个输入域上的正确性。
- 设计一种算法,在正确性、效率和扩展代码的低开销之间实现平衡。
- 将该方法应用于一系列基准测试,包括归约操作以及非结合操作如 is-sorted 和 length。
实验结果
研究问题
- RQ1当存在正确合并算子时,能否自动合成分治并行化中的正确合并操作?
- RQ2在何种条件下,可自动扩展无法并行化的循环,以支持高效的分治并行化?
- RQ3能否自动为合成的合并操作生成机器可检查的正确性证明?
- RQ4是否能将代码扩展的开销保持在较低水平,同时确保并行化带来的性能提升?
- RQ5合成的并行程序性能与顺序版本及手工优化版本相比如何?
主要发现
- 所提出的方法在所有测试基准上成功合成了正确的合并操作,包括 is-sorted 和 length 等复杂情况,其合并操作并非显而易见。
- 该算法自动生成包含辅助累加器的代码扩展,使原本无法并行化的操作得以实现并行化。
- 所有合成的合并操作均附带机器可检查的正确性证明,确保在整个输入域上均正确。
- 该技术平均实现了接近理想的加速比,平均加速比为 9.8,标准差为 0.04,表明具有高度的一致性与可扩展性。
- 该方法优于先前工作如 SYMPA 和 [33],因为它仅需单一顺序实现作为输入,而无需像其他方法那样要求左向与右向遍历。
- 该方法在默认非结合的函数(如 length 和 is-sorted)上也有效,通过自动推断必要的辅助信息实现。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。