[论文解读] A New Data Layout For Set Intersection on GPUs
本文提出 BatMap,一种针对 GPU 优化的数据布局,用于高效集合交集运算,可在稀疏数据集中实现高速频繁项对挖掘。通过使用广义的布氏哈希方案,将集合组织为紧凑且适合并行处理的格式,BatMap 在 CPU 实现上实现了高达 5 倍的加速,优于传统的位图和基于归并的方法,尤其在大规模、密集数据且频繁项较多的情况下表现更优。
Set intersection is the core in a variety of problems, e.g. frequent itemset mining and sparse boolean matrix multiplication. It is well-known that large speed gains can, for some computational problems, be obtained by using a graphics processing unit (GPU) as a massively parallel computing device. However, GPUs require highly regular control flow and memory access patterns, and for this reason previous GPU methods for intersecting sets have used a simple bitmap representation. This representation requires excessive space on sparse data sets. In this paper we present a novel data layout, "BatMap", that is particularly well suited for parallel processing, and is compact even for sparse data. Frequent itemset mining is one of the most important applications of set intersection. As a case-study on the potential of BatMaps we focus on frequent pair mining, which is a core special case of frequent itemset mining. The main finding is that our method is able to achieve speedups over both Apriori and FP-growth when the number of distinct items is large, and the density of the problem instance is above 1%. Previous implementations of frequent itemset mining on GPU have not been able to show speedups over the best single-threaded implementations.
研究动机与目标
- 为解决 GPU 上集合交集运算的性能瓶颈,特别是针对传统位图表示内存效率低下的稀疏数据集。
- 设计一种数据布局,以实现高度规则的内存访问和控制流,从而最大限度发挥 GPU 并行性。
- 实现在 GPU 上可扩展的频繁项集挖掘——特别是频繁项对挖掘——克服以往基于 GPU 的方法无法超越单线程 CPU 实现的局限性。
- 证明即使在稀疏布尔矩阵乘法和关联规则挖掘等复杂、计算密集型工作负载中,GPU 加速依然有效。
提出的方法
- 提出 BatMap,一种新型数据布局,利用广义布氏哈希方案将集合以紧凑、缓存友好的格式存储,优化 GPU 内存层次结构。
- 将交集计算划分为 16×16 的块,以高效利用共享内存并最小化全局内存访问延迟。
- 采用位级并行策略,每个线程块处理交集矩阵的一个块,利用 warp 级原语高效计算集合中 1 的位数。
- 采用混合方法:对于小集合,BatMap 直接以紧凑格式存储元素;对于大集合,则使用多个哈希表的稀疏表示,以减少冲突并改善负载均衡。
- 基于 popcount 指令的计数技术,实现交集大小的并行计算,最小化分支发散并最大化吞吐量。
- 通过合并全局内存访问并最小化全局内存与共享内存之间的冗余数据移动,优化内存访问。
实验结果
研究问题
- RQ1能否设计一种新型数据布局,实现在 GPU 上高效、可扩展的集合交集运算,同时在稀疏数据集中保持紧凑的内存使用?
- RQ2在不同项目数较多的情况下,GPU 并行性在频繁项对挖掘中能多大程度上超越单线程 CPU 实现?
- RQ3BatMap 在 GPU 和 CPU 架构上与传统位图和排序列表归并方法相比,性能表现如何?
- RQ4所提出的布局能否扩展以支持超过两个集合的交集?其内存与性能权衡如何?
主要发现
- BatMap 在 GPU 上的处理速度达到 36.2 GB/s,即使不计入 CPU 的开销,也接近 CPU 最大吞吐量 7.6 GB/s 的 5 倍。
- BatMap 的 GPU 实现每秒可处理 3.68×10⁹ 个集合元素,显著优于单核 CPU 实现的每秒 2.25×10⁸ 个元素,后者速度慢超过 13 倍。
- 使用 8 个 CPU 核心时,处理速率达到每秒 1.71×10⁹ 个元素,仍仅为 GPU 吞吐量的 29–57%,表明存在显著的性能差距。
- 该方法使频繁项对挖掘可扩展至包含数万个项目且密度高于 1% 的数据集,而此前的 GPU 方法无法超越单线程 CPU 代码。
- BatMap 的紧凑表示相比位图显著降低了内存使用,尤其在舍入效应有利时,单位内存中可容纳的元素数量最多可提升 63%。
- 作者得出结论,其方法远未达到 GPU 内存带宽的饱和点,表明仍有进一步优化的空间,并可广泛应用于大规模数据挖掘工作负载。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。