Implicitly parallel task-based runtime systems often perform dynamic analysis to discover dependencies in and extract parallelism from sequential programs. Dependence analysis becomes expensive as task granularity drops below a threshold. Tracing techniques have been developed where programmers annotate repeated program fragments (traces) issued by the application, and the runtime system memoizes the dependence analysis for those fragments, greatly reducing overhead when the fragments are executed again. However, manual trace annotation can be brittle and not easily applicable to complex programs built through the composition of independent components. We introduce Apophenia, a system that automatically traces the dependence analysis of task-based runtime systems, removing the burden of manual annotations from programmers and enabling new and complex programs to be traced. Apophenia identifies traces dynamically through a series of dynamic string analyses, which find repeated program fragments in the stream of tasks issued to the runtime system. We show that Apophenia is able to come between 0.92x--1.03x the performance of manually traced programs, and is able to effectively trace previously untraced programs to yield speedups of between 0.91x--2.82x on the Perlmutter and Eos supercomputers.
翻译:隐式并行任务型运行时系统通常通过动态分析来发现顺序程序中的依赖关系并提取并行性。当任务粒度降至特定阈值以下时,依赖分析的开销会显著增加。追踪技术应运而生:程序员对应用程序发出的重复程序片段(即追踪单元)进行标注,运行时系统则对这些片段的依赖分析结果进行记忆化存储,从而在片段重复执行时大幅降低开销。然而,手动标注追踪单元存在脆弱性,且难以适用于通过独立组件组合构建的复杂程序。本文提出Apophenia系统,该系统能自动完成基于任务的运行时系统的依赖分析追踪,既免除了程序员手动标注的负担,又使得新颖复杂的程序能够被追踪。Apophenia通过一系列动态字符串分析技术识别追踪单元,这些技术可在提交至运行时系统的任务流中发现重复的程序片段。实验表明,Apophenia在Perlmutter和Eos超级计算机上能达到手动追踪程序性能的0.92倍至1.03倍,并能有效追踪先前无法追踪的程序,实现0.91倍至2.82倍的加速比。