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.


翻译:并行扫描原语计算由$p$个连续排名处理器在可结合且可能代价高昂的二元运算符$\oplus$下对输入向量进行逐元素包含或独占前缀和。在具有有限单端口通信能力的消息传递系统中,执行扫描至少需要$\lceil\log_2 p\rceil$或$\lceil\log_2 (p-1)\rceil$次发送-接收通信轮次。尽管存在广为人知的简单包含扫描算法,可在$\lceil\log_2 p\rceil$次发送-接收通信轮次内通过$\lceil\log_2 p\rceil$次$\oplus$运算符应用解决问题,但独占扫描有所不同且研究较少。通过考虑独占前缀和问题的自然不变量,本文提出两种在通信轮次数和$\oplus$运算符应用次数上均高效的算法。第一种算法包含一个包含扫描阶段和一个独占扫描阶段,在通信轮次数与$\oplus$运算符应用次数之间进行权衡。包含扫描阶段的最小轮次数$q'$满足总轮次数$q=\lceil\log_2 p\rceil$时$q'\geq q-\log_2(2^q-p+1)$。另一种算法是对轮次最优的全归约算法的改进,其$\oplus$运算符的额外应用次数取决于$p-1$中置位比特的数量(即popcount)。两种算法均适用于输入向量较小的情况,此时性能由通信轮次数主导。对于大输入向量,必须采用其他(流水线化、固定度数树)算法。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
【剑桥大学-算法手册】Advanced Algorithms, Artificial Intelligence
专知会员服务
36+阅读 · 2024年11月11日
【2023新书】并行算法,Parallel Algorithms ,400页pdf
专知会员服务
72+阅读 · 2023年8月6日
专知会员服务
82+阅读 · 2020年12月22日
异质信息网络分析与应用综述,软件学报-北京邮电大学
综述:军事应用中使用的一些重要算法
专知
13+阅读 · 2022年7月3日
综述:Image Caption 任务之语句多样性
PaperWeekly
22+阅读 · 2018年11月30日
推荐系统算法合集,满满都是干货(建议收藏)
七月在线实验室
17+阅读 · 2018年7月23日
SCENE-一个可扩展两层级新闻推荐系统
全球人工智能
11+阅读 · 2018年1月7日
CNN 反向传播算法推导
统计学习与视觉计算组
30+阅读 · 2017年12月29日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
推荐|caffe-orc主流ocr算法:CNN+BLSTM+CTC架构实现!
全球人工智能
19+阅读 · 2017年10月29日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
1+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
3+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
8+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
5+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
战略前沿人工智能的再思考(中文)
专知会员服务
7+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
5+阅读 · 5月29日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员