arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.06161cs.DC
收藏

GPU带宽最优随机置乱算法

Bandwidth-Optimal Random Shuffling for GPUs

Rory Mitchell, Daniel Stokes, Eibe Frank, Geoffrey Holmes

摘要:

传统上用于在CPU上混洗数据的线性时间算法(诸如Fisher-Yates的方法)由于固有的顺序依赖性而不太适合在GPU上实现,并且现有的并行混洗算法不适合GPU架构,因为它们引起对高延迟全局存储器的大量读/写操作。为了解决这个问题,我们提供了一种方法,通过融合合适的伪随机双射函数与流压缩操作并行生成伪随机排列。我们的算法,被称为“双射洗牌”交易增加了每线程的算术运算,减少了全局内存事务。它工作效率高、确定性强,并且每个混洗输入只需要一次全局内存读写,从而最大限度地利用全局内存带宽。为了实证证明算法的正确性,我们开发了一个基于核空间嵌入的伪随机置换质量的统计测试。实验结果表明,双射洗牌算法优于竞争算法在GPU上,表现出一个和两个数量级的改善和接近峰值设备带宽。

英文摘要:

Linear-time algorithms that are traditionally used to shuffle data on CPUs, such as the method of Fisher-Yates, are not well suited to implementation on GPUs due to inherent sequential dependencies, and existing parallel shuffling algorithms are unsuitable for GPU architectures because they incur a large number of read/write operations to high latency global memory. To address this, we provide a method of generating pseudo-random permutations in parallel by fusing suitable pseudo-random bijective functions with stream compaction operations. Our algorithm, termed `bijective shuffle' trades increased per-thread arithmetic operations for reduced global memory transactions. It is work-efficient, deterministic, and only requires a single global memory read and write per shuffle input, thus maximising use of global memory bandwidth. To empirically demonstrate the correctness of the algorithm, we develop a statistical test for the quality of pseudo-random permutations based on kernel space embeddings. Experimental results show that the bijective shuffle algorithm outperforms competing algorithms on GPUs, showing improvements of between one and two orders of magnitude and approaching peak device bandwidth.

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

↑