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

并行前缀和与SIMD

Parallel Prefix Sum with SIMD

Wangda Zhang, Yanbin Wang, Kenneth A. Ross

AI总结:

本文研究使用SIMD和多线程计算前缀和的方法,提出一种按缓存大小分区的新技术,以减少内存带宽瓶颈,实验表明比标准库实现快最多3倍。

摘要:

前缀和操作是一种有用的原语,具有广泛的应用范围。对于数据库系统而言,它是许多重要运算符(包括连接、排序和过滤查询)的构建块。在本文中,我们研究了使用SIMD指令和多线程计算前缀和的不同方法。对于SIMD,我们实现并比较了水平与垂直计算,以及一种使用收集/散列指令的理论上工作高效的平衡树版本。通过多线程,内存带宽可能成为前缀和计算的瓶颈。我们提出了一种新方法,将数据划分为缓存大小的较小分区,以实现更好的数据局部性并减少对RAM的带宽需求。我们还研究了四种不同的组织计算子过程的方式,它们具有不同的性能和可用性特征。在实验中,我们发现使用我们的分区技术的最有效前缀和计算比两个已经使用SIMD和多线程的标准库实现快最多3倍。

英文摘要:

The prefix sum operation is a useful primitive with a broad range of applications. For database systems, it is a building block of many important operators including join, sort and filter queries. In this paper, we study different methods of computing prefix sums with SIMD instructions and multiple threads. For SIMD, we implement and compare horizontal and vertical computations, as well as a theoretically work-efficient balanced tree version using gather/scatter instructions. With multithreading, the memory bandwidth can become the bottleneck of prefix sum computations. We propose a new method that partitions data into cache-sized smaller partitions to achieve better data locality and reduce bandwidth demands from RAM. We also investigate four different ways of organizing the computation sub-procedures, which have different performance and usability characteristics. In the experiments we find that the most efficient prefix sum computation using our partitioning technique is up to 3x faster than two standard library implementations that already use SIMD and multithreading.

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

↑