[论文解读] GPU sample sort
本文提出了一种针对多核GPU高度优化的样本排序算法,通过多路划分实现对现有GPU排序算法的超越。在均匀分布的键上,其性能比Thrust的归并排序快68%,比GPU快速排序快2倍以上,同时在64位整数上平均比基数排序快2倍。
In this paper, we present the design of a sample sort algorithm for manycore GPUs. Despite being one of the most efficient comparison-based sorting algorithms for distributed memory architectures its performance on GPUs was previously unknown. For uniformly distributed keys our sample sort is at least 25% and on average 68% faster than the best comparison-based sorting algorithm, GPU Thrust merge sort, and on average more than 2 times faster than GPU quicksort. Moreover, for 64-bit integer keys it is at least 63% and on average 2 times faster than the highly optimized GPU Thrust radix sort that directly manipulates the binary representation of keys. Our implementation is robust to different distributions and entropy levels of keys and scales almost linearly with the input size. These results indicate that multi-way techniques in general and sample sort in particular achieve substantially better performance than two-way merge sort and quicksort.
研究动机与目标
- 设计一种针对多核GPU架构优化的样本排序算法,此前样本排序在GPU上的性能尚未被探索。
- 评估样本排序相对于Thrust归并排序和快速排序等成熟GPU排序算法的性能表现。
- 将样本排序与高度优化的GPU基数排序在64位整数键上进行对比。
- 评估样本排序在不同数据分布和熵水平下的鲁棒性与可扩展性。
提出的方法
- 该算法基于采样键确定分割点,采用多路划分,实现数据在GPU线程块间的高效分布。
- 通过基于样本的分割点选择,最小化负载不平衡,并减少划分过程中的全局内存访问。
- 设计融合了线程块内排序与并行划分,以最大化GPU占用率和内存合并访问。
- 实现针对均匀与非均匀键分布的优化,确保在不同数据熵水平下保持一致的性能表现。
- 利用GPU特定优化技术,如共享内存使用和线程束级原语,加速比较操作与数据移动。
实验结果
研究问题
- RQ1与成熟的基于比较的GPU排序算法(如归并排序和快速排序)相比,样本排序在GPU上的表现如何?
- RQ2样本排序能否在64位整数键上超越高度优化的GPU基数排序?
- RQ3样本排序对数据分布和熵水平变化的鲁棒性如何?
- RQ4该算法在GPU架构上随输入规模增加的可扩展性如何?
主要发现
- 对于均匀分布的键,样本排序比Thrust归并排序至少快25%,平均快68%。
- 在均匀分布数据上,样本排序平均比GPU快速排序快2倍以上。
- 对于64位整数键,样本排序比优化后的GPU Thrust基数排序至少快63%,平均快2倍。
- 该算法在不同数据分布下表现出接近线性的可扩展性。
- 样本排序在多种键分布和熵水平下均保持高性能,展现出强大的鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。