Hardware Implementation of a Neural Network
AssigneeImagination Technologies Limited
InventorsXiran Huang, Cagatay Dikici
Life of this patent
Estimating the term…
Abstract
A hardware implementation of a neural network and a method of processing data in such a hardware implementation are disclosed. Input data for a plurality of layers of the network is processed in blocks, to generate respective blocks of output data. The processing proceeds depth-wise through the plurality of layers, evaluating all layers of the plurality of layers for a given block, before proceeding to the next block.
Claims20
A method of processing data in a hardware implementation of a neural network, the hardware implementation comprising one or more first memory devices and one or more second memory devices, the neural network including a plurality of layers, the method comprising:
- providing, in the one or more first memory devices, weight data representing weights for the plurality of layers and input data for the plurality of layers;
- reading, from the one or more first memory devices, a first subset of the input data, representing a first block of the input data;
- reading, from the one or more first memory devices, the weight data;
- processing the weight data and the first subset of the input data, to evaluate each layer of the plurality of layers and thereby calculate a first block of output data, wherein evaluating at least one layer subsequent to a first layer of the plurality of layers comprises:
- reading output data of a preceding layer from the one or more second memory devices;
- processing the weight data and the output data of the preceding layer to evaluate the at least one layer, and thereby calculate output data of the at least one layer;
- and
- writing the output data of the at least one layer into the one or more second memory devices to be read during the evaluation of a subsequent layer;
- and
- writing the first block of output data to the one or more first memory devices,
- wherein at least one of the plurality of layers is a convolutional layer.
A hardware implementation of a neural network including a plurality of layers at least one of which is a convolutional layer, the hardware implementation comprising:
- one or more first memory devices, configured to store:
- weight data representing weights for the plurality of layers;
- and
- input data for the plurality of layers,
- one or more second memory devices,
- an input buffer, configured to obtain a first subset of the input data, representing a first block of the input data,
- a coefficient buffer, configured to obtain the weight data,
- one or more processing elements, configured to process the weight data and the first subset of the input data, to evaluate each layer of the plurality of layers and thereby calculate a first block of output data, and
- an output buffer, configured to output the first block of output data,
- wherein, to evaluate at least one layer subsequent to a first layer of the plurality of layers:
- the input buffer is configured to read, from the one or more second memory devices, output data of a preceding layer;
- the one or more processing elements are configured to process the weight data and the output data of the preceding layer to evaluate the at least one layer, and thereby calculate output data of the at least one layer;
- and
- the output buffer is configured to write the output data of the at least one layer into the one or more second memory devices to be read during the evaluation of a subsequent layer.
A non-transitory computer readable storage medium having stored thereon computer readable code configured to cause to be performed, when the code is run, a method of processing data in a hardware implementation of a neural network, the hardware implementation comprising one or more first memory devices and one or more second memory devices, the neural network including a plurality of layers, the method comprising:
- providing, in the one or more first memory devices, weight data representing weights for the plurality of layers and input data for the plurality of layers;
- reading, from the one or more first memory devices, a first subset of the input data, representing a first block of the input data;
- reading, from the one or more first memory devices, the weight data;
- processing the weight data and the first subset of the input data, to evaluate each layer of the plurality of layers and thereby calculate a first block of output data, wherein evaluating at least one layer subsequent to a first layer of the plurality of layers comprises:
- reading output data of a preceding layer from the one or more second memory devices;
- processing the weight data and the output data of the preceding layer to evaluate the at least one layer, and thereby calculate output data of the at least one layer;
- and
- writing the output data of the at least one layer into the one or more second memory devices to be read during the evaluation of a subsequent layer;
- and
- writing the first block of output data to the one or more first memory devices,
- wherein at least one of the plurality of layers is a convolutional layer.
Dependencies are inferred from the claim text.