arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.06386cs.DCcs.MScs.SC
收藏

关于GPU上多精度整数除法的实现

On GPU Implementation for Multi-Precision Integer Division

University of Copenhagen(哥本哈根大学);Cheriton School of Computer Science, University of Waterloo(滑铁卢大学切里顿计算机科学学院)

Martin B. Marchioro, Aske N. Raahauge, Marc I. Løvenskjold, Cosmin E. Oancea, Stephen M. Watt

AI总结:

本文提出一种基于牛顿迭代的整数除法算法在GPU上的高效实现,针对$2^{15}$到$2^{18}$位精度,通过算法改进和成本模型实现接近最优性能。

摘要:

本文介绍了在通用GPU上实现快速整数除法算法时出现的问题。该算法使用基于移位逆运算的牛顿迭代,将所有算术运算保持在整数域内,并依赖数据并行操作符。主要贡献是针对$2^{15}$到$2^{18}$位整数精度的高效GPU/CUDA实现——这些大小是\cgbn{}除法不支持的。我们提出了算法改进,定义了基于乘法的成本模型,构建了前缀和以及先前关于多精度乘法的工作,并给出了评估,显示对于目标精度,性能接近模型最优。

英文摘要:

This paper presents the issues arising in implementing a fast integer division algorithm on general purpose GPUs. The algorithm uses a Newton iteration based on the shifted inverse operation, keeping all arithmetic in the integer domain and relying on data-parallel operators. The principal contribution is an efficient GPU/CUDA implementation for integer precisions from $2^{15}$ to $2^{18}$ -- sizes not supported by \cgbn{} division. We propose algorithmic refinements, define a cost model in terms of multiplications, build on prefix sums and previous work on multi-precision multiplication, and present an evaluation showing near-optimal performance relative to the model for the target precision.

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

↑