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能够达到手动追踪程序性能的0.92倍至1.03倍,并且能够有效追踪先前未追踪的程序,在Perlmutter和Eos超级计算机上实现0.91倍至2.82倍的加速比。