你从未听说过的最佳多核并行化重构
The best multicore-parallelization refactoring you've never heard of
AI总结:
本文针对难并行化的树遍历算法的多核并行问题,借鉴编程语言经典技术结合心跳调度自动粒度控制,通过简单重构步骤实现并行,无需特殊编译器支持,可用于教学和一次性并行化场景。
摘要:
在这篇短文中,我们探索了一种重构方法的新思路,将一种简单却难以并行化的树遍历算法进行重构以利用多核并行能力。关键在于,该重构借鉴了编程语言研究中的若干经典技术,例如续体传递风格变换(continuation-passing-style transform)和去函数化(defunctionalization)。我们研究的算法因需处理范围极广的输入,面临着尤为严峻的粒度控制挑战。我们的方案借助心跳调度(heartbeat scheduling)实现高效性,这是一种近年提出的自动粒度控制方法。我们从算法的高层递归规约出发,通过一系列各自独立的简单重构步骤呈现该方案。因此,我们的方法有望作为教学工具发挥作用,也可用于一次性并行化场景,因为该技术无需特殊的编译器支持。
英文摘要:
In this short paper, we explore a new way to refactor a simple but tricky-to-parallelize tree-traversal algorithm to harness multicore parallelism. Crucially, the refactoring draws from some classic techniques from programming-languages research, such as the continuation-passing-style transform and defunctionalization. The algorithm we consider faces a particularly acute granularity-control challenge, owing to the wide range of inputs it has to deal with. Our solution achieves efficiency from heartbeat scheduling, a recent approach to automatic granularity control. We present our solution in a series of individually simple refactoring steps, starting from a high-level, recursive specification of the algorithm. As such, our approach may prove useful as a teaching tool, and perhaps be used for one-off parallelizations, as the technique requires no special compiler support.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。