硬件加速多列表合并,速度比现有方案快2.6倍
Fast and Efficient Merge of Sorted Input Lists in Hardware Using List Offset Merge Sorters
- 通过行列交替排序的偏移列表架构实现高速合并
- 2路合并32个元素仅需2.24纳秒,快2.63倍
- 适合在FPGA上实现大规模高效合并,资源占用少
本文提出新型硬件合并排序装置——列表偏移合并排序器(LOMS),可快速高效地将多个已排序输入列表合并为单一有序输出。在每个LOMS中,各输入列表值以二维阵列形式排列,但彼此顺序相互偏移。通过最少数量的列排序与行排序交替阶段,将输入阵列转换为最终有序输出。2路LOMS仅需2个合并阶段,显著优于基特·巴彻特的比特onic和奇偶合并排序器。其首阶段采用新型单阶段2路合并排序器(S2MS),二者均可处理任意大小混合输入,而巴彻特方法要求输入长度相等且为2的幂。在本研究目标FPGA上,S2MS虽最快但占用大量LUT资源;而LOMS 2路设备资源更少,使更大规模设备可在同一FPGA上实现。2路合并32×2=64个元素仅耗时2.24纳秒,相较同类巴彻特设备提速2.63倍;3路合并7×3=21个元素耗时3.4纳秒,较当前最优3路设备提速1.36倍。
原文摘要 · Abstract (English)
A new set of hardware merge sort devices are introduced here, which merge multiple sorted input lists into a single sorted output list in a fast and efficient manner. In each merge sorter, the values from the sorted input lists are arranged in an input 2-D setup array, but with the order of each sorted input list offset from the order of each of the other sorted input lists. In these new devices, called List Offset Merge Sorters (LOMS), a minimal set of column sort stages alternating with row sort stages process the input setup array into a final output array, now in the defined sorted order. LOMS 2-way sorters, which merge 2 sorted input lists, require only 2 merge stages and are significantly faster than Kenneth Batcher's previous state-of-the-art 2-way merge devices, Bitonic Merge Sorters and Odd-Even Merge Sorters. LOMS 2-way sorters utilize the recently-introduced Single-Stage 2-way Merge Sorters (S2MS) in their first stage. Both LOMS and S2MS devices can merge any mixture of input list sizes, while Batcher's merge sorters are difficult to design unless the 2 input lists are equal, and a power-of-2. By themselves, S2MS devices are the fastest 2-way merge sorters when implemented in this study's target FPGA devices, but they tend to use a large number of LUT resources. LOMS 2-way devices use fewer resources than comparable S2MS devices, enabling some large LOMS devices to be implemented in a given FPGA when comparable S2MS devices cannot fit in that FPGA. A List Offset 2-way sorter merges 2 lists, each with 32 values, into a sorted output list of those 64 values in 2.24 nS, a speedup of 2.63 versus a comparable Batcher device. A LOMS 3-way merge sorter, merging 3 sorted input lists with 7 values, fully merges the 21 values in 3.4 nS, a speedup of 1.36 versus the comparable state-of-the-art 3-way merge device.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。