CPC G06N 3/063 (2013.01) [G06N 3/04 (2013.01)] | 18 Claims |
1. A neural network device, comprising:
an on-chip buffer memory configured to store an input feature map of a first layer of a neural network;
a local bus connecting the on-chip buffer memory to a computational circuit;
the computational circuit configured to receive the input feature map of the first layer as read from a single port of the on-chip buffer memory, and as transmitted from the single port to the computational circuit via the local bus, and perform a neural network operation on the input feature map of the first layer to output an output feature map of the first layer corresponding to the input feature map of the first layer; and
a controller configured to control transmission of the output feature map of the first layer to be outputted from the computational circuit via the local bus to the on-chip buffer memory to store the output feature map of the first layer and the input feature map of the first layer together in the on-chip buffer memory,
wherein the output feature map of the first layer is reused, from the on-chip buffer memory, as an input feature map for a neural network operation of a second layer subsequent to the first layer,
wherein, when a read operation of the input feature map of the first layer and a write operation of the output feature map of the first layer are simultaneously requested, an order of the read operation and the write operation are adjusted on the local bus, to prevent a collision between the read operation and the write operation in the single port,
wherein the computational circuit is further configured to perform the neural network operation based on one or more operation loops,
wherein the controller is further configured to perform the read operation of reading data constituting, at least, a portion of the input feature map of the first layer from the on-chip buffer memory through the single port at each cycle in which each of the one or more operation loops is executed, and
when the write operation for writing data constituting, at least, a portion of the output feature map of the first layer to the on-chip buffer memory through the single port is requested at a timing at which the read operation is to be performed, the write operation is performed in preference to the read operation.
|