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.


翻译:本文探讨了在通用GPU上实现快速整数除法算法时所面临的问题。该算法采用基于移位逆运算的牛顿迭代法,所有算术运算均在整数域内进行,并依赖数据并行算子。主要贡献在于针对$2^{15}$至$2^{18}$精度的整数——即\cgbn{}除法未支持的位数范围——提出了一种高效的GPU/CUDA实现方案。我们提出了算法优化策略,建立了以乘法运算次数为单位的成本模型,基于前缀和与多精度乘法前期研究成果进行开发,并通过评估表明该方法在目标精度下实现了接近模型理论最优的性能表现。

0
下载
关闭预览

相关内容

面向多GPU的图神经网络训练加速
专知会员服务
24+阅读 · 2023年1月19日
【经典书】算法C语言实现,Algorithms in C. 672页pdf
专知会员服务
82+阅读 · 2020年8月13日
盘点来自工业界的GPU共享方案
计算机视觉life
12+阅读 · 2021年9月2日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
机器学习中的最优化算法总结
人工智能前沿讲习班
22+阅读 · 2019年3月22日
深度学习TensorFlow实现集合
专知
10+阅读 · 2018年9月8日
【收藏】机器学习的Pytorch实现资源集合【附下载链接】
机器学习算法与Python学习
10+阅读 · 2018年9月8日
深度学习的GPU:深度学习中使用GPU的经验和建议
数据挖掘入门与实战
11+阅读 · 2018年1月3日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关VIP内容
面向多GPU的图神经网络训练加速
专知会员服务
24+阅读 · 2023年1月19日
【经典书】算法C语言实现,Algorithms in C. 672页pdf
专知会员服务
82+阅读 · 2020年8月13日
相关资讯
盘点来自工业界的GPU共享方案
计算机视觉life
12+阅读 · 2021年9月2日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
机器学习中的最优化算法总结
人工智能前沿讲习班
22+阅读 · 2019年3月22日
深度学习TensorFlow实现集合
专知
10+阅读 · 2018年9月8日
【收藏】机器学习的Pytorch实现资源集合【附下载链接】
机器学习算法与Python学习
10+阅读 · 2018年9月8日
深度学习的GPU:深度学习中使用GPU的经验和建议
数据挖掘入门与实战
11+阅读 · 2018年1月3日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员