CPFloat: A C Library for Simulating Low-precision Arithmetic

Author:

Fasi Massimiliano1ORCID,Mikaitis Mantas2ORCID

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

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3