Abstract :
Unconventional functions including activation functions, and power functions are extremely hard-to-realize primarily due to the difficulty in arriving at the hierarchical design. The hierarchical design allows the synthesis tool to map the functionality with that of standard cells employed through the regular ASIC synthesis flow. For conventional functions, the hierarchical design is structured and then supplied to the synthesis flow, whereas, for unconventional functions, the same method is not reliable, since the current synthesis method does not offer any design-space exploration scheme to arrive at an easy-to-realize design entity. The unconventional functions either take long synthesis run-time or additional efforts are spent in restructuring the hierarchical design for the desired function to synthesizable ones. Cartesian Genetic Programming (CGP) allows to not only incorporate custom logic gates for synthesizing the hierarchical design but also aids in the design-space exploration for the targeted function through the custom gates. The CGP configuration evolves difficult-to-realize complex functions with multiple solutions, and filtering through desired pareto-optimal requirements offers a unique hierarchical design. Incorporating CGP-derived hierarchical designs into the traditional synthesis flow is instrumental for implementing and evaluating higher-order designs comprising of non-linear functional constructs. Six activation functions, and power functions that fall in the category of unconventional functions, are realized by the CGP method using custom cells to demonstrate the capability. Further, the hierarchical design of these unconventional functions are flattened and compared with the same function that is directly synthesized using basic gates. The CGP-derived synthesis method reports 3× less synthesis time for realizing the complex functions at the hierarchical level compared to the synthesis using basic gate cells. Hardware characteristics and error metrics are also investigated for the CGP realized complex functions and are made freely available for further usage to the research and designers’ community.
Power function circuits, showcasing the advantages of BwF, eVar :
For activation functions application, the website structure is as shown :
Activation functions used in Neural Networks are chosen as designs to benchmark the algorithm. The various functions evolved are :
Quantization is needed to represent the continuous functions with fixed point number.
Round to Floor quantization is used for all the circuits, where the continuous values are rounded to nearest values less-than-or-equal that can be represented using the chosen data format.
The input data format has Four different fixed point configurations with different range-precision tradeoffs :
Configuration 1 for all circuits
Configuration2 for Gaussian
Configuration2 for
Sigmoid, ReLU, GeLU, Softplus
Configuration2 for tanh
Configuration3 for all circuits
Configuration4 for all circuits
Four different data configurations are used to develop the circuits with the following ranges :
CGP is an evolutionary algorithm, which can be used to obtain functionally sub-optimal but hardware efficient circuits. To characterize these approximate circuits the error reports contain reports of various error metrics : Error Count (EC),Error Probability (EP), Absolute Error Maximum value(AEmax), Absolute Error Minimum value (AEmin), Absolute Error Standard Deviation (AESTD), Hamming Distance(HD) between expected and circuit output, Mean Absolute Error (MAE), Mean Square Error (MSE), Mean Relative Error (MRE), Median and Mode of Absolute Error
A error plot is also provided to visualize the circuit output, location of erroneous output and the histogram of error values.
The Circuit Photos of all the activation functions are included to understand the structure of combinatorial circuits.
In addition all the circuits are characterized for area, power and delay when standard cell libraries of varying richness (number and type of cells) are used.
Resources :
CGP:
https://link.springer.com/book/10.1007/978-3-642-17310-3#about
Open source Process Design Kits:
https://github.com/google/skywater-pdk
Copyright 2023 : Prashanth H C (prashanth.c@iiitb.ac.in)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.