Exact Computation of Error in Approximate Circuits using SAT and Message-Passing Algorithms
Abstract
Effective usage of approximate circuits for various performance trade-offs requires accurate computation of error. Several average and worst case error metrics have been proposed in the literature. We propose a framework for exact computation of these error metrics, including the error rate (ER), mean absolute error (MAE), mean squared error (MSE) and the worst-case error (WCE). We use a combination of SAT and message-passing algorithms. Our algorithm takes as input the CNF formula for the exact and approximate circuits followed by a subtractor that finds the difference of the two outputs. This is converted into a tree, with each vertex of the tree associated with a sub-formulas and all satisfying solutions to it. Once this is done, any probability can be computed by setting appropriate error bits and using a message passing algorithm on the tree. Since message-passing is fast, besides ER and MAE, computation of metrics like MSE is also very efficient. In fact, it is possible to get the entire probability distribution of the error. Besides standard benchmarks, we could compute the error metrics exactly for approximate Gaussian and Sobel filters, which has not been done previously.
- Publication:
-
arXiv e-prints
- Pub Date:
- November 2024
- DOI:
- 10.48550/arXiv.2411.10037
- arXiv:
- arXiv:2411.10037
- Bibcode:
- 2024arXiv241110037R
- Keywords:
-
- Computer Science - Logic in Computer Science
- E-Print:
- 6 pages, 3 figures