arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.13077cs.DScs.DC
收藏

许多顺序迭代算法可以并行且(几乎)有效

Many Sequential Iterative Algorithms Can Be Parallel and (Nearly) Work-efficient

Zheqi Shen, Zijin Wan, Yan Gu, Yihan Sun

摘要:

为了设计高效的并行算法,最近的一些论文表明,许多顺序迭代算法可以直接并行化,但在实现工作效率和高并行性方面仍然存在挑战。对于依赖项的数量渐近地超过最优顺序工作界限的某些问题,工作效率可能是困难的。为了实现高并行性,我们希望并行处理尽可能多的对象。目标是为具有最深依赖长度$D$的问题实现$\tilde{O}(D)$跨度。我们把这种性质称为轮效率。在本文中,我们展示了各种经典问题的工作效率和轮效率的算法,并提出了一般的方法来做到这一点。为了有效地并行许多顺序迭代算法,我们提出了阶段并行框架。框架为每个对象分配一个等级,并相应地处理它们。具有相同秩的所有对象可以并行处理。为了实现工作效率和高并行性,我们使用两种类型的通用技术。类型1算法的目标是使用范围查询来提取具有相同秩的所有对象,这样我们就可以避免评估所有的依赖关系。我们讨论活动选择,无限背包,以及更多使用类型1框架。第二类算法的目标是在对象依赖的最后一个对象完成时唤醒对象。我们讨论活动选择,最长增加子序列(LIS),和许多其他算法使用类型2的框架。我们所有的算法(几乎)都是工作效率和轮效率的。其中许多算法改进了已有的最优界,有些算法是第一次以轮效率达到工作效率。我们也实施了其中的许多措施。在具有合理依赖深度的输入上,我们的算法是高度并行化的,并且显著优于顺序算法。

英文摘要:

To design efficient parallel algorithms, some recent papers showed that many sequential iterative algorithms can be directly parallelized but there are still challenges in achieving work-efficiency and high-parallelism. Work-efficiency can be hard for certain problems where the number of dependences is asymptotically more than optimal sequential work bound. To achieve high-parallelism, we want to process as many objects as possible in parallel. The goal is to achieve $\tilde{O}(D)$ span for a problem with the deepest dependence length $D$. We refer to this property as round-efficiency. In this paper, we show work-efficient and round-efficient algorithms for a variety of classic problems and propose general approaches to do so. To efficiently parallelize many sequential iterative algorithms, we propose the phase-parallel framework. The framework assigns a rank to each object and processes them accordingly. All objects with the same rank can be processed in parallel. To enable work-efficiency and high parallelism, we use two types of general techniques. Type 1 algorithms aim to use range queries to extract all objects with the same rank, such that we avoid evaluating all the dependences. We discuss activity selection, unlimited knapsack, and more using Type 1 framework. Type 2 algorithms aim to wake up an object when the last object it depends on is finished. We discuss activity selection, longest increasing subsequence (LIS), and many other algorithms using Type 2 framework. All of our algorithms are (nearly) work-efficient and round-efficient. Many of them improve previous best bounds, and some of them are the first to achieve work-efficiency with round-efficiency. We also implement many of them. On inputs with reasonable dependence depth, our algorithms are highly parallelized and significantly outperform their sequential counterparts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑