GPU上针对小范围整数键的共享内存范围分块CDF排序
Shared-Memory Range-Tiled CDF Sort for Small-Range Integer Keys on GPUs
浏览论文内容
中文总结 AI 辅助
该研究针对GPU上小范围整数键排序问题,提出RT-CDF算法,经RTX 4090实验验证其在中小范围场景下性能优于多个基准方法,最大加速比达4.39,但不适用于大范围场景。
中文摘要 AI 辅助
我们研究GPU上已知元素取值范围的整数不稳定排序问题。聚焦于基于计数排序的方法,这类方法通过每个值的频率及其前缀和确定其输出区间,我们提出并评估范围分块CDF排序(RT-CDF),该方法将可能的取值范围划分为适合共享内存存储的小区间(称为块)。对于每个块,RT-CDF构建直方图,计算其前缀和作为局部累积分布函数(CDF),并直接通过局部CDF生成输出数组。我们将RT-CDF与三个基准方法对比:CUB DeviceRadixSort(其处理的比特范围限制在[0,⌈log₂R⌉)以利用已知范围大小R)、Ref-H-P排序,以及基于Kolonias等人算法的实现。在NVIDIA GeForce RTX 4090上开展实验,范围大小R从2⁷到2¹⁸,输入规模n从10⁶到10⁹,输入分布包括均匀分布、正态分布和全相等输入,结果显示,在中小范围的广泛条件下,RT-CDF的性能优于所有基准方法,相对于最快基准方法的最大加速比达4.39。但当R=2¹⁸时,对于所有评估的输入规模和输入分布,至少有一个基准方法的性能优于RT-CDF,这表明直方图构建的成本限制了RT-CDF在更大范围场景下的适用性。
英文摘要
We study unstable integer sorting on GPUs for arrays whose elements lie in a known integer range. Focusing on counting-sort-based methods that determine the output interval of each value from its frequency and the prefix sums of the frequencies, we propose and evaluate Range-Tiled CDF sort (RT-CDF), which partitions the possible value range into small intervals, called tiles, that fit in shared memory. For each tile, RT-CDF constructs a histogram, computes its prefix sum as a local CDF, and directly generates the output array from the local CDF. We compare RT-CDF against three baselines: CUB DeviceRadixSort, whose processed bit range is restricted to $[0,\lceil\log_2 R\rceil)$ to exploit the known range size $R$; Ref-H-P sort; and an implementation based on the algorithm of Kolonias et al. Experiments on an NVIDIA GeForce RTX 4090 with range sizes from $R=2^7$ to $2^{18}$, input sizes from $n=10^6$ to $10^9$, and uniformly distributed, normally distributed, and all-equal inputs show that RT-CDF outperforms the baselines over a broad set of conditions for small to medium ranges, achieving a maximum speedup of 4.39 over the fastest baseline. For $R=2^{18}$, however, at least one baseline outperforms RT-CDF for every evaluated input size and input distribution, showing that the cost of histogram construction limits the applicability of RT-CDF to larger ranges.
发表机构
- Hosei University(法政大学)
- THIRD Inc.(THIRD公司)
- Osaka Metropolitan University(大阪公立大学)
机构由 AI 辅助整理,请以论文原文为准。