Back to results
US 12,124,940 B2Granted
Processing method and device, operation method and device
AssigneeShanghai Cambricon Information Technology Co., Ltd.
InventorsShaoli Liu, Xuda Zhou, Zidong Du, Daofu Liu
Life of this patent
Estimating the term…
Abstract
The application provides an operation method and device. Quantized data is looked up to realize an operation, which simplifies the structure and reduces the computation energy consumption of the data, meanwhile, a plurality of operations are realized.
Claims16
An operation device, comprising:
- an instruction control unit configured to decode a received instruction and generate lookup control information;
- and
- a lookup table unit configured to identify output neurons in an operation codebook according to the lookup control information and a received weight dictionary, a neuron dictionary, an operation codebook, one or more groups of weights, and input neurons,
- wherein each of the one or more groups of weights are further clustered into multiple types of weights,
- wherein the weight dictionary includes weight indexes,
- wherein each of the weight indexes corresponds to one of the multiple types of weights,
- wherein the weight dictionary further includes weight positions,
- wherein the neuron dictionary includes the input neurons and neuron indexes, and
- wherein the operation codebook includes the weight indexes, the neuron indexes, and
- operation results of the input neurons and the weights,
- a preprocessing unit configured to preprocess input information to obtain the weights, the input neurons, the instruction, the weight dictionary, the neuron dictionary, and the operation codebook;
- a storage unit configured to store the input neurons, the weights, the weight dictionary, the neuron dictionary, the operation codebook, and the instruction, and receive the output neurons;
- a cache unit configured to cache the instruction, the input neurons, the weights, the weight indexes, the neuron indexes, and the output neurons;
- and
- a direct memory access (DMA) configured to read and write data or instructions between the storage unit and the cache unit.
12 more elements
An operation method, comprising:
- receiving one or more groups of weights, input neurons, an instruction, a weight dictionary, a neuron dictionary, and an operation codebook;
- decoding the instruction to determine lookup control information;
- and
- identifying output neurons in the operation codebook according to the lookup control information, the weights, the weight dictionary, the neuron dictionary, and the input neurons,
- wherein each of the one or more groups of weights are further clustered into multiple types of weights,
- wherein the weight dictionary includes weight indexes,
- wherein each of the weight indexes corresponds to one of the multiple types of weights,
- wherein the weight dictionary includes the weight positions and the weight indexes;
- wherein the neuron dictionary includes the input neurons and the neuron indexes;
- wherein the operation codebook includes the weight indexes, the neuron indexes, and
- operation results of the weights and the input neurons,
- wherein the identifying the output neurons in the operation codebook according to the lookup control information, the weights, and the input neurons includes:
- determining neuron ranges to determine the neuron indexes in the neuron dictionary:
- determining the weight positions to determine the weight indexes in the weight dictionary according to the weights, the input neurons, the weight dictionary, and the neuron dictionary;
- and
- identifying the operation results in the operation codebook according to the weight indexes and the neuron indexes to determine the output neurons.
13 more elements
Dependencies are inferred from the claim text.