Affiliation:
1. Durham University, United Kingdom
2. University of Leeds, United Kingdom
Abstract
One can simulate low-precision floating-point arithmetic via software by executing each arithmetic operation in hardware and then rounding the result to the desired number of significant bits. For IEEE-compliant formats, rounding requires only standard mathematical library functions, but handling subnormals, underflow, and overflow demands special attention, and numerical errors can cause mathematically correct formulae to behave incorrectly in finite arithmetic. Moreover, the ensuing implementations are not necessarily efficient, as the library functions these techniques build upon are typically designed to handle a broad range of cases and may not be optimized for the specific needs of rounding algorithms. CPFloat is a C library for simulating low-precision arithmetics. It offers efficient routines for rounding, performing mathematical computations, and querying properties of the simulated low-precision format. The software exploits the bit-level floating-point representation of the format in which the numbers are stored and replaces costly library calls with low-level bit manipulations and integer arithmetic. In numerical experiments, the new techniques bring a considerable speedup (typically one order of magnitude or more) over existing alternatives in C, C++, and MATLAB. To our knowledge, CPFloat is currently the most efficient and complete library for experimenting with custom low-precision floating-point arithmetic.
Funder
Royal Society, by Istituto Nazionale di Alta Matematica INdAM-GNCS Project 2020, and by Wenner-Gren Foundations
EPSRC Doctoral Prize Fellowship and by EPSRC
Department of Mathematics, the University of Manchester
School of Science and Technology, Örebro University, Örebro
Publisher
Association for Computing Machinery (ACM)
Subject
Applied Mathematics,Software
Reference60 articles.
1. Arm Limited. 2020. Arm Architecture Reference Manual. Technical Report ARM DDI 0487F.c (ID072120). Retrieved from https://developer.arm.com/documentation/ddi0487/fc/.
2. Coping with Silent Errors in HPC Applications
3. Emulation of a FMA and Correctly Rounded Sums: Proved Algorithms Using Rounding to Odd
4. A Study of the Effects and Benefits of Custom-Precision Mathematical Libraries for HPC Codes
5. J. Mark Bull. 1999. Measuring synchronisation and scheduling overheads in OpenMP. In Proceedings of 1st European Workshop on OpenMP. Wiley, 99–105.
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Fixed-Point Arithmetic Analysis for Development of LLaMA 3 On-Device Accelerator;JOURNAL OF BROADCAST ENGINEERING;2024-07-31
2. MixPert: Optimizing Mixed-Precision Floating-Point Emulation on GPU Integer Tensor Cores;Proceedings of the 25th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems;2024-06-20
3. Monotonicity of Multi-term Floating-Point Adders;IEEE Transactions on Computers;2024-06
4. IEEE-754 Precision-
p
base-β Arithmetic Implemented in Binary;ACM Transactions on Mathematical Software;2023-12-15
5. Uncertainty Quantification of Reduced-Precision Time Series in Turbulent Channel Flow;Proceedings of the SC '23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis;2023-11-12