CPC G06F 3/0611 (2013.01) [G06F 3/0619 (2013.01); G06F 3/0631 (2013.01); G06F 3/0683 (2013.01); G06F 13/1668 (2013.01); G06N 3/02 (2013.01); G06F 2213/16 (2013.01)] | 18 Claims |
11. A data pre-processing device, comprising:
a storage capacity obtaining circuit configured to obtain an available storage capacity of a first memory, and a target operation;
an input determination circuit configured to determine target input data corresponding to the target operation according to the target operation and the available storage capacity of the first memory;
an output determination circuit configured to determine target output data corresponding to the target operation according to the target operation and the target input data; and
a storage allocation module configured to store the intermediate computation result of the current operation into the first memory when an intermediate computation result output by a current operation in the target operation is required as the input data of another operation in the target operation;
wherein the target operation includes one or more operations, each operation represents an operation layer in a neural network, the target operation is obtained by fusing a plurality of operation layers having data dependence relationship in a depth direction of the neural network; and
wherein a number of operation layers in the plurality of operation layers to be fused in the target operation is determined based on the available storage capacity of the first memory and a data volume of the target input data and on a requirement that an intermediate computation result output by any operation in one or more operations fused in the target operation can be stored in the first memory.
|