两种高效的消息传递独占扫描算法
Two Efficient Message-passing Exclusive Scan Algorithms
AI总结:
本文提出两种高效的独占扫描算法,通过平衡通信轮次和运算次数,适用于小规模输入向量,而大规模输入则需其他算法。
摘要:
并行扫描原语在具有受限、单端口通信能力的消息传递系统中,至少需要⌈log₂p⌉或⌈log₂(p-1)⌉次发送-接收通信轮次来执行扫描操作。虽然已知有简单的算法可以在⌈log₂p⌉次通信轮次中用⌈log₂p⌉次应用⊕运算符解决包含性扫描问题,但排除性扫描则不同,且较少被关注。通过考虑排除性前缀和问题中的自然不变量,我们提出了两种不同的算法,这些算法在通信轮次和⊕运算符的应用次数上都高效。第一种算法包括一个包含性扫描阶段和一个排除性扫描阶段,并在通信轮次次数和⊕运算符应用次数之间进行权衡。最小的包含性扫描轮次数为q'≥q−log₂(2⁵−p+1)。另一种算法是对一种轮次最优的全部减少算法的修改,额外的⊕运算符应用次数取决于p−1中设置的位数(popcount)。这两种算法对于小(或更小)的输入向量而言,性能主要由通信轮次数量决定。对于大规模输入向量,必须使用其他(流水线、固定度树)算法。
英文摘要:
Parallel scan primitives compute element-wise inclusive or exclusive prefix sums of input vectors contributed by $p$ consecutively ranked processors under an associative, possibly expensive, binary operator $\oplus$. In message-passing systems with bounded, one-ported communication capabilities, at least $\lceil\log_2 p\rceil$ or $\lceil\log_2 (p-1)\rceil$ send-receive communication rounds are required to perform the scans. While there are well-known, simple algorithms for the inclusive scan that solve the problem in $\lceil\log_2 p\rceil$ send-receive communication rounds with $\lceil\log_2 p\rceil$ applications of the $\oplus$ operator, the exclusive scan is different and has been much less addressed. By considering natural invariants for the exclusive prefix sums problem, we present two different algorithms that are efficient in the number of communication rounds and in the number of applications of the $\oplus$ operator. The first algorithm consists of an inclusive scan phase and an exclusive scan phase and trades the number of communication rounds against the number of applications of the $\oplus$ operator. The smallest number of inclusive scan rounds with $q=\lceil\log_2 p\rceil$ rounds in total is $q'\geq q-\log_2(2^q-p+1)$. The other algorithm is a modification of a round-optimal all-reduce algorithm, and the number of additional applications of the $\oplus$ operator is dependent on the number of bits set (popcount of) in $p-1$. Both algorithms are relevant for small(er) input vectors where performance is dominated by the number of communication rounds. For large input vectors, other (pipelined, fixed-degree tree) algorithms must be used.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。