Power conversion in neural networks
AssigneeCambricon Technologies Corporation Limited
InventorsShaoli Liu, Yimin Zhuang, Qi Guo, Tianshi Chen
Life of this patent
Estimating the term…
Abstract
The present disclosure provides an operation device, comprising: an operation module for executing a neural network operation; and a power conversion module connected to the operation module, for converting input neuron data and/or output neuron data of the neural network operation into power neuron data. The present disclosure further provides an operation method. The operation device and method according to the present disclosure reduce the cost of storage resources and computing resources and increase the operation speed.
Claims22
An operation device, comprising:
- an operation circuit for executing a neural network operation;
- a power conversion circuit connected to the operation circuit, for converting input neuron data and/or output neuron data of the neural network operation into power neuron data, wherein the power conversion circuit includes:
- a first power conversion circuit configured to convert the neuron data output from the operation circuit into the power neuron data, and
- a second power conversion circuit configured to convert the neuron data input to the operation circuit into the power neuron data, wherein the power neuron data includes:
- one or more sign bits that indicate a sign of the power neuron data, two or more power bits that indicate power-bit data of the power neuron data;
- a storage module configured to store an encoding table that includes the power-bit data and exponential values corresponding to the power-bit data,
- wherein a correspondence in the encoding table is a positive correlation, the storage module is pre-stored with an integer x and a positive integer y, wherein an exponential value corresponding to a minimum power-bit data in the encoding table is x, where x denotes an offset value and y denotes a step length.
An operation method, comprising:
- executing, by an operation circuit, a neural network operation;
- converting, by a power conversion circuit, neuron data of the neural network operation into power neuron data prior to the execution of the neural network operation;
- converting, by the power conversion circuit, the neuron data of the neural network operation into the power neuron data after the execution of the neural network operation;
- converting, by a first power conversion circuit of the power conversion circuit, the neuron data of the neural network operation into the power neuron data;
- converting, by a second power conversion circuit of the power conversion circuit, the neuron data of the neural network operation into the power neuron data, wherein the power neuron data includes:
- one or more sign bits that indicate a sign of the power neuron data,
- two or more power bits that indicate power-bit data of the power neuron data;
- and
- storing, by a storage module, an encoding table that includes the power-bit data and exponential values corresponding to the power-bit data, wherein a correspondence in the encoding table is a positive correlation, the storage module is pre-stored with an integer x and a positive integer y, wherein an exponential value corresponding to a minimum power-bit data in the encoding table is x, where x denotes an offset value and y denotes a step length.
Dependencies are inferred from the claim text.