๐ค AI Summary
This work investigates the efficient GPU implementation of high-order, block-level arithmetic operations for medium-sized large integers (ranging from 2ยนโต to 2ยนโน bits). Leveraging the functional language Futhark, the authors concisely express algorithms for addition, subtraction, multiplication, and division using high-level abstractions, while relying on the compiler to automatically map arrays to GPU registers for performance optimization. Through targeted compiler enhancements, the Futhark implementation achieves performance approaching that of hand-optimized C++/CUDA code and the CGBN library. These results demonstrate that high-level functional languages can effectively combine expressive power with computational efficiency in high-performance computing contexts.
๐ Abstract
We report on GPU implementations of block-level addition, subtraction, multiplication and division for midsize integers, with operands of $2^{15}$ to $2^{19}$ bits using the high-level functional language Futhark. Comparing with hand-written C++/CUDA versions and CGBN, we identify which functional constructs compile well, where memory placement and sequentialization are effective, and what compiler support is needed. The results show that high-level code can express the algorithms compactly while approaching competitive performance after certain compiler improvements. In particular, we find that automated placement of arrays in GPU register memory is critical for performance.