arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.01693cs.DCcs.DS
收藏

面向GPU的可扩展并发队列

Packed-Ring Queues: Lock-Free and Wait-Free Concurrent Queues on GPU

Virginia Tech(弗吉尼亚理工大学);Lawrence Livermore National Laboratory(劳伦斯利弗莫尔国家实验室)

Pratheek Prakash Shetty, Thomas R. W. Scogland, Wu-chun Feng

AI总结:

针对GPU的SIMT执行和巨大并行性,提出三种线性化并发队列(无锁到无等待),通过波批量快速路径和64位CAS打包共享状态,实现高吞吐和有限内存。

摘要:

并发队列通过成为任务分发、负载均衡和资源利用的关键瓶颈,可显著影响超级计算性能。随着HPC系统超越1000万处理器核心,在生产者与消费者线程之间快速移动项目而无需过多锁定的能力对于高效队列、防止空闲核心、最大化利用率以及实现高并行加速至关重要。虽然并发队列在CPU上已被充分研究,但在现代GPU上仍基本未探索,其中SIMT执行、大规模并行性和原子争用重塑了设计空间。我们提出了三种线性化GPU并发队列,涵盖从无锁到无等待的保证:(1) G-WFQ-YMC,Yang和Mellor-Crummey无等待队列的改编,使用预分配段;(2) G-LFQ,一个有界无锁队列,使用波批量快速路径最大化吞吐量;(3) G-WFQ,一个有界无等待队列,将共享状态打包到64位比较并交换操作中,同时保持线性化和有界内存。

英文摘要:

Concurrent queues are a foundational building block of parallel programming. On CPUs, decades of research have produced queue designs with well-understood correctness and progress guarantees -- from lock-free rings to wait-free constructions. On GPUs, where queues increasingly sit on the critical path of device-side task graphs and GPU-initiated I/O, no comparable foundation exists: SIMT execution serializes divergent retries across a warp; tens of thousands of threads contend on the same counter words; the double-width atomics that several CPU designs assume are absent; and GPU memory models are weakly ordered, so the classical algorithms do not transfer unchanged. We present the packed-ring queues (PRQs) -- two linearizable, bounded GPU queues that represent each compound atomic state in one native word of at most 64 bits: (1) PRQ-LF, a lock-free ring whose warp-batched fast path issues one atomic per warp on each of the queue's contended words, and (2) PRQ-WF, a wait-free ring in which peer threads cooperatively complete any operation that falls behind. To the best of our knowledge, PRQ-WF is the first GPU concurrent queue whose wait-freedom is proved as a theorem, with no assumption about how the GPU schedules threads. Across four GPUs from two vendors (NVIDIA A100 and GH200, AMD MI210 and MI300A), PRQ-LF outperforms the blocking Broker Queue by 5.0-20.4x at 32K threads, and PRQ-WF sustains throughput under producer/consumer imbalance where a prior design completes fewer than 0.1% of its attempts.

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

↑