The Accuracy and Efficiency of Posit Arithmetic

Stefan Dan Ciocirlan, Dumitrel Loghin, Lavanya Ramapantulu, Nicolae Tapus, Yong Meng Teo
9/16/2021
cs.ARcs.PF

Official code: dloghin/posar (4 stars, C, Apache-2.0, last commit 2021-10-15).

Abstract

Motivated by the increasing interest in the posit numeric format, in this paper we evaluate the accuracy and efficiency of posit arithmetic in contrast to the traditional IEEE 754 32-bit floating-point (FP32) arithmetic. We first design and implement a Posit Arithmetic Unit (PAU), called POSAR, with flexible bit-sized arithmetic suitable for applications that can trade accuracy for savings in chip area.

Show full abstract

Next, we analyze the accuracy and efficiency of POSAR with a series of benchmarks including mathematical computations, ML kernels, NAS Parallel Benchmarks (NPB), and Cifar-10 CNN. This analysis is done on our implementation of POSAR integrated into a RISC-V Rocket Chip core in comparison with the IEEE 754-based Floting Point Unit (FPU) of Rocket Chip. Our analysis shows that POSAR can outperform the FPU, but the results are not spectacular. For NPB, 32-bit posit achieves better accuracy than FP32 and improves the execution by up to 2%. However, POSAR with 32-bit posit needs 30% more FPGA resources compared to the FPU. For classic ML algorithms, we find that 8-bit posits are not suitable to replace FP32 because they exhibit low accuracy leading to wrong results. Instead, 16-bit posit offers the best option in terms of accuracy and efficiency. For example, 16-bit posit achieves the same Top-1 accuracy as FP32 on a Cifar-10 CNN with a speedup of 18%.

View on arXivView PDF

Code Implementations(1)

dloghin/posarOfficial100%
Apache-2.0

E-PAU: Elastic Posit Arithmetic Unit

42C, MakefileAug 31, 20205 years agoApache-2.0

Similar Papers

Cite this paper

@article{ciocirlan2021accuracy,
  title  = {The Accuracy and Efficiency of Posit Arithmetic},
  author = {Stefan Dan Ciocirlan and Dumitrel Loghin and Lavanya Ramapantulu and Nicolae Tapus and Yong Meng Teo},
  year   = {2021},
  eprint = {2109.08225},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.08225}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2109.08225.svg)](https://codeofpaper.com/paper/2109.08225)

Discussion