GPU Implementations for Midsize Integer Addition and Multiplication
Cosmin E. Oancea, Stephen M. Watt

TL;DR
This paper demonstrates simple, efficient GPU implementations for midsize integer addition and multiplication, outperforming existing libraries for large integers and exploring the use of FFT multiplication within CUDA constraints.
Contribution
It introduces straightforward GPU algorithms for integer addition and multiplication, including FFT-based methods, with performance advantages over prior complex tiling strategies.
Findings
CUDA implementation outperforms CGBN for integers >32K bits
FFT multiplication surpasses classical methods at large sizes within a CUDA block
Simple, locality-aware strategies enable efficient midsize integer arithmetic on GPUs
Abstract
This paper explores practical aspects of using a high-level functional language for GPU-based arithmetic on ``midsize'' integers. By this we mean integers of up to about a quarter million bits, which is sufficient for most practical purposes. The goal is to understand whether it is possible to support efficient nested-parallel programs with a small, flexible code base. We report on GPU implementations for addition and multiplication of integers that fit in one CUDA block, thus leveraging temporal reuse from scratchpad memories. Our key contribution resides in the simplicity of the proposed solutions: We recognize that addition is a straightforward application of scan, which is known to allow efficient GPU implementation. For quadratic multiplication we employ a simple work-partitioning strategy that offers good temporal locality. For FFT multiplication, we efficiently map the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Cryptography and Residue Arithmetic · Numerical Methods and Algorithms
