arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.12270cs.DS
收藏

GPU上的加权随机采样

Weighted Random Sampling on GPUs

Hans-Peter Lehmann, Lorenz Hübschle-Schneider, Peter Sanders

摘要:

别名表是一种数据结构,它允许在恒定时间内有效地绘制加权随机样本,并且可以在线性时间内构造。Hübschle-Schneider和Sanders的PSA算法能够在CPU上并行构造别名表。在本报告中,我们将PSA算法转移到GPU上。我们的构造算法在消费级GPU上实现了17的加速比,而PSA方法在16核高端桌面CPU上实现了17的加速比。对于采样,我们实现了高达24倍的高吞吐量。这两种操作所需的能量也比CPU少几倍。有助于实现这一点的调整包括更改内存访问模式以进行合并访问。如果这是不可能的,我们首先使用合并访问将数据复制到更快的共享内存。我们还增强了二叉搜索的泛化能力,使其能够并行搜索一系列项目。除了朴素抽样,我们还提出了改进的批量抽样算法。

英文摘要:

An alias table is a data structure that allows for efficiently drawing weighted random samples in constant time and can be constructed in linear time. The PSA algorithm by Hübschle-Schneider and Sanders is able to construct alias tables in parallel on the CPU. In this report, we transfer the PSA algorithm to the GPU. Our construction algorithm achieves a speedup of 17 on a consumer GPU in comparison to the PSA method on a 16-core high-end desktop CPU. For sampling, we achieve an up to 24 times higher throughput. Both operations also require several times less energy than on the CPU. Adaptations helping to achieve this include changing memory access patterns to do coalesced access. Where this is not possible, we first copy data to the faster shared memory using coalesced access. We also enhance a generalization of binary search enabling to search for a range of items in parallel. Besides naive sampling, we also give improved batched sampling algorithms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑