Error Distribution Estimation for Fixed-point Arithmetic using Program Derivatives

Soramichi Akiyama1, Ryota Shioya2, Yuto Miyatake3, Tongxin Yang4
1Ritsumeikan University, 2The University of Tokyo, 3Osaka University, 4Sony Semiconductor Solutions Corporation


Abstract

Fixed-point arithmetic is widely used because of its efficiency in the latency, area, and power consumption. However, determining the number of bits assigned to each variable while considering the balance of efficiency and the error of the program output is challenging. To ease this burden, we (1) propose a new method that estimates the statistical error distributions of the program output when fixed-point arithmetic is used, and (2) implement error estimation system for HLS programs based on our method. The main idea is to apply an error propagation model based on program derivatives to the distributions of data and their errors. This achieves estimating not only the range of the errors but also the statistical aspects of them without feeding a lot of input data to the program. Furthermore, the input data and their errors can be tweaked at the distribution level, allowing an easy-to-conduct robustness analysis of chosen precision. Our experiments show that our method can estimate error distributions for various operators and a realistic application well, and the estimated results can be used for different types of analyses that help the user determine precision in fixed-point arithmetic.