Programmable Activation Function Execution Unit for Neural Network Inference
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for processing activation functions in hardware require significant chip area and power consumption, and are limited in handling new or modified activation functions without hardware modifications.
Innovation Solution
A programming method that uses machine-learning to approximate a target activation function to a programmed activation function, allowing for efficient and flexible programming of non-linear activation functions in hardware, and a hardware design that includes a Programmable Activation Function Execution (PAFE) unit to process these functions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If complex mathematical activation functions are implemented in hardware, then inference accuracy of the ANN is improved, but chip area and power consumption increase significantly
Solution Approach 1:
The patent transforms the activation function from a complex mathematical form into a piecewise linear approximation by changing the functional parameters. This allows the hardware implementation to use simple linear segments instead of complex non-linear calculations, reducing chip area while maintaining acceptable inference accuracy through optimized segment selection and configuration
Solution Approach 2:
The activation function is divided into multiple linear segments that approximate the original non-linear curve. Each segment can be independently implemented in hardware using simple comparators and linear function units, reducing the overall hardware complexity and chip area required compared to implementing the complete complex mathematical function
2Measurement precision
If complex mathematical activation functions are implemented in hardware, then inference accuracy of the ANN is improved, but power consumption increases significantly
Solution Approach 1:
By transforming the activation function into piecewise linear form with optimized parameters, the hardware implementation requires simpler computational operations that consume less power. The linear segments use basic arithmetic operations instead of complex non-linear function evaluations, significantly reducing power consumption while preserving essential inference accuracy
Solution Approach 2:
Dividing the activation function into linear segments enables the use of低功耗 (low-power) linear computation units instead of high-power complex mathematical function units. Each segment can be processed efficiently with minimal computational resources, reducing overall power consumption of the hardware accelerator
3Productivity
If hardware is designed for specific activation functions, then processing efficiency is improved, but adaptability to new or modified activation functions deteriorates
Solution Approach 1:
The hardware design incorporates dynamically configurable parameters that allow the activation function characteristics to be changed through software control rather than hardware reconfiguration. The piecewise linear segments and their parameters can be programmatically adjusted to implement different activation functions, providing both high processing efficiency and flexibility for new function implementations
Solution Approach 2:
The hardware accelerator is designed with a universal piecewise linear approximation engine that can implement multiple different activation functions using the same core architecture. By configuring the linear segments and parameters appropriately, the same hardware can efficiently process various activation functions including new or modified ones without requiring hardware modifications
Data Source
AI summary
An activation function conversion program unit and method may be configured to approximate a target activation function to a programmed activation function through machine-learning of an artificial neural network. The method may include setting up a target activation function; approximating the target activation function to a programmed activation function by machine-learning an artificial neural network; and converting the programmed activation function into a slope and offset and storing it in a lookup table. Accordingly, the computation speed and power consumption of the programmed activation function execution unit of an NPU may be optimized.


