Neural network acceleration method, device, computer equipment and storage medium based on systolic array

By dividing the convolution filter and the feature map, making the convolution calculation step size 1, and superposing the results, the problem of low computational efficiency in the existing technology when the convolution step size is not 1 is solved, and a more efficient neural network is achieved. Network computing.

CN110135556BActive Publication Date: 2024-08-23PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910268881.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-04
Publication Date
2024-08-23
Estimated Expiration
2039-04-04

Smart Images

  • Figure CN110135556B
    Figure CN110135556B
Patent Text Reader

Abstract

The present application relates to the field of model construction, and when the convolution step size is not 1, the filter and the feature map are segmented according to a preset rule to make the convolution equivalent to a convolution with a step size of 1 to adapt to the systolic array. Specifically disclosed are a neural network acceleration method, device, computer equipment and storage medium based on a systolic array, the method comprising: obtaining the convolution parameters of the convolution filter; if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a number of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule; obtaining the feature map to be convolved and segmenting a number of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule; based on the systolic array, convolution calculations are performed on the corresponding feature sub-maps according to each sub-filter, and the step size of the convolution calculation is 1; the convolution calculation results corresponding to each sub-filter are superimposed, and the superimposed result is output as the result of the convolution calculation of the convolution filter on the feature map to be convolved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of neural network technology, and in particular to a neural network acceleration method, device, computer equipment and storage medium based on a systolic array. Background Art

[0002] The most important part of commonly used neural networks is the calculation of convolution. In convolution calculation, we often encounter the situation that the convolution filter is not equal to 1. In this case, some mainstream neural network calculation libraries, such as CUDNN (NVIDIA's deep network calculation library), will significantly slow down when calculating this convolution. Some deep learning accelerators such as field-programmable gate arrays (FPGAs) and dedicated network processors (NPUs) usually use a systolic array structure to implement the convolution part. This structure is very unfriendly to the situation that the convolution filter of the convolution filter is not equal to 1.

[0003] The existing technology generally calculates the convolution result when the convolution step size is 1 first, and then downsamples and discards unnecessary convolution results to obtain a feature map with a specific convolution step size. This will obviously waste computing and scheduling resources and also slow down the convolution calculation. Summary of the invention

[0004] The embodiments of the present application provide a neural network acceleration method, apparatus, computer equipment and storage medium based on a systolic array, which can better solve the problem that convolution calculations with a step size not equal to 1 will waste systolic array computing and scheduling resources.

[0005] In a first aspect, the present application provides a neural network acceleration method based on a systolic array, the method comprising:

[0006] Acquire convolution parameters of a convolution filter, wherein the convolution parameters include a convolution step size and a size of the convolution filter;

[0007] If the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are divided from the convolution filter according to a preset filter division rule, and the size of each sub-filter is smaller than the size of the convolution filter;

[0008] Acquire a feature map to be convolved and segment a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, wherein the plurality of feature sub-maps correspond one-to-one to the plurality of sub-filters;

[0009] Based on the systolic array, convolution calculation is performed on the corresponding feature subgraphs according to each of the sub-filters, and the step size of the convolution calculation is 1;

[0010] The convolution calculation results corresponding to each of the sub-filters are superimposed, and the superimposed result is output as the result of the convolution calculation of the feature map to be convolved by the convolution filter.

[0011] In a second aspect, the present application provides a neural network acceleration device based on a systolic array, the device comprising:

[0012] A convolution parameter acquisition module, used to acquire convolution parameters of a convolution filter, wherein the convolution parameters include a convolution step size and a size of the convolution filter;

[0013] A filter segmentation module, configured to segment the convolution filter into a plurality of sub-filters according to a preset filter segmentation rule if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, wherein the size of each sub-filter is smaller than the size of the convolution filter;

[0014] A feature map segmentation module, used to obtain the feature map to be convolved and segment a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, wherein the plurality of feature sub-maps correspond to the plurality of sub-filters one by one;

[0015] A convolution module, used for performing convolution calculation on the corresponding feature subgraphs according to the sub-filters based on the systolic array, and the step length of the convolution calculation is 1;

[0016] The superposition module is used to superimpose the convolution calculation results corresponding to each of the sub-filters, and output the superposition result as the result of the convolution calculation of the feature map to be convolved by the convolution filter.

[0017] In a third aspect, the present application provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the above-mentioned systolic array-based neural network acceleration method when executing the computer program.

[0018] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. If the computer program is executed by a processor, the above-mentioned neural network acceleration method based on the systolic array is implemented.

[0019] The present application discloses a neural network acceleration method, apparatus, device and storage medium based on a systolic array. When the convolution step is not 1, a plurality of sub-filters are segmented from a convolution filter according to a preset filter segmentation rule, and a plurality of feature sub-graphs are segmented from a feature graph to be convolved according to a preset feature graph segmentation rule, so that a convolution calculation can be performed with a convolution step of 1. The convolution calculation results corresponding to each sub-filter are superimposed, and the superposition result is the same as the convolution calculation result with a convolution step of not 1 performed on the feature graph to be convolved according to the original convolution filter, that is, the two convolution calculations before and after the segmentation operation are equivalent; however, since the convolution step is 1 after the segmentation operation, the computing power of the systolic array can be more fully utilized. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A schematic diagram of a flow chart of a neural network acceleration method based on a systolic array according to an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a flow chart of a neural network acceleration method based on a systolic array according to another embodiment of the present application;

[0023] Figure 3 Schematic diagram of splitting convolution filter when the convolution step size is 2 and the convolution filter size is 2×2;

[0024] Figure 4 It is a schematic diagram of segmenting the feature map to be convolved when the convolution step size is 2 and the convolution filter size is 2×2;

[0025] Figure 5 for Figure 1 Segmentation of features to be convolved Figure 1 A schematic diagram of a sub-process of an implementation method;

[0026] Figure 6 It is a schematic diagram of the feature map to be convolved after segmentation and zero padding;

[0027] Figure 7 It is a schematic diagram of the structure of the pulsating array;

[0028] Figure 8 Schematic diagram of performing convolution calculations for a systolic array;

[0029] Fig. 9 for Figure 1 Schematic diagram of the sub-process of convolution calculation based on systolic array;

[0030] Fig.10 A schematic diagram of a flow chart of a neural network acceleration method based on a systolic array according to another embodiment of the present application;

[0031] Fig.11 Schematic diagram of splitting convolution filter when the convolution step size is 2 and the convolution filter size is 3×3;

[0032] Fig.12 Schematic diagram of the sub-process of splitting the convolution filter when the convolution step size is 2 and the convolution filter size is 3×3;

[0033] Fig.13 It is a schematic diagram of segmenting the feature map to be convolved when the convolution step size is 2 and the convolution filter size is 3×3;

[0034] Fig.14 A schematic diagram of a flow chart of a neural network acceleration method based on a systolic array according to another embodiment of the present application;

[0035] Fig.15 Schematic diagram of segmenting convolution filter when the convolution step size is 3 and the convolution filter size is 3×3;

[0036] Fig.16 It is a schematic diagram of the sub-process of segmenting the feature map to be convolved when the convolution step size is 3 and the convolution filter size is 3×3;

[0037] Fig.17 It is a schematic diagram of segmenting the feature map to be convolved when the convolution step size is 3 and the convolution filter size is 3×3;

[0038] Fig.18 A schematic diagram of equivalent transformation of the topological structure of downsampling of deep convolutional neural network according to the neural network acceleration method;

[0039] Fig.19 A schematic diagram of the structure of a neural network acceleration device based on a systolic array according to an embodiment of the present application;

[0040] Fig. 20 A schematic diagram of the structure of a neural network acceleration device based on a systolic array according to another embodiment of the present application;

[0041] Fig.21 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.

[0044] The embodiments of the present application provide a method, apparatus, device and storage medium for accelerating a neural network based on a systolic array. The method for accelerating a neural network based on a systolic array can be applied to a terminal or a server to accelerate the training or reasoning of a neural network based on a systolic array.

[0045] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0046] See also Figure 1 , Figure 1 It is a flowchart of a neural network acceleration method based on a systolic array provided in an embodiment of the present application.

[0047] like Figure 1 As shown, the neural network acceleration method based on the systolic array includes the following steps:

[0048] Step S110, obtaining convolution parameters of the convolution filter.

[0049] The convolution parameters include the convolution step size and the size of the convolution filter.

[0050] Filter, also known as kernel kernel, feature detector, sliding the filter on the input image or feature map and calculating the dot product is called convolution operation. The output matrix of the convolution operation is called convolved feature, activation map or feature map.

[0051] Exemplarily, before performing a convolution operation on a neuron in a neural network, convolution parameters of a pre-stored or initialized convolution filter are first obtained.

[0052] In this embodiment, the convolution parameters include the convolution step size stride and the size of the convolution filter, that is, the height h and width w of the convolution filter; in other embodiments, the convolution parameters also include the number of input channels and / or the number of output channels; wherein the number of input channels in depth is determined by the number of channels of the feature map to be convolved, and the number of output channels out depth is equal to the number of convolution filters, which can determine the number of channels of the output feature map after the convolution is completed.

[0053] The neural network acceleration method based on systolic array can be used in scenarios where the number of input channels is equal to 1 or greater than 1, and can also be used in scenarios where the number of output channels is equal to 1 or greater than 1.

[0054] Step S120: If the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are divided from the convolution filter according to a preset filter division rule.

[0055] Wherein, the size of each of the sub-filters is smaller than the size of the convolution filter.

[0056] Some deep learning accelerators such as FPGA and dedicated NPU usually use a systolic array structure to implement the convolution part, but this structure is very unfriendly to the situation where the convolution step size is not equal to 1; this embodiment divides the convolution filter with a size greater than 1×1 into several sub-filters, so that each sub-filter performs a convolution operation with a convolution step size equal to 1, thereby fully utilizing the performance of the systolic array structure.

[0057] In some embodiments, Figure 2 and Figure 3 As shown, in step S120, if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule, specifically including:

[0058] Step S121: If the convolution step size is 2 and the size of the convolution filter is 2×2, four sub-filters are divided from the convolution filter, and the size of each sub-filter is 1×1.

[0059] like Figure 3 As shown in the figure, the convolution parameters corresponding to a certain convolution operation are [6 6 2 2], that is, the number of input channels in depth is 6, the number of output channels out depth is equal to 6, and the sizes of the 6 convolution filters Kernel Tensor are all 2×2.

[0060] like Figure 3As shown, each 2×2 convolution filter is divided into 4 1×1 sub-filters. Taking the 4 sub-filters divided by the first convolution filter as an example, the first sub-filter includes the weights w1 of the odd rows and odd columns of the convolution filter, the second sub-filter includes the weights w2 of the odd rows and even columns of the convolution filter, the third sub-filter includes the weights w3 of the even rows and odd columns of the convolution filter, and the fourth sub-filter includes the weights w4 of the even rows and even columns of the convolution filter.

[0061] Specifically, the weights of the first row and first column of the convolution filter are assigned to the first 1×1 sub-filter, the weights of the first row and second column of the convolution filter are assigned to the second 1×1 sub-filter, the weights of the second row and first column of the convolution filter are assigned to the third 1×1 sub-filter, and the weights of the second row and second column of the convolution filter are assigned to the fourth 1×1 sub-filter.

[0062] Step S130, obtaining a feature map to be convolved and segmenting a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule.

[0063] The plurality of characteristic subgraphs correspond one-to-one to the plurality of sub-filters.

[0064] Exemplarily, the number of channels of the feature map to be convolved may be equal to 1 or greater than 1, and the number of channels of the feature map to be convolved may determine the number of input channels in the convolution parameters of the corresponding convolution filter.

[0065] In some embodiments, Figure 2 and Figure 4 As shown, if the convolution step size is 2 and the size of the convolution filter is 2×2, step S130 obtains the feature map to be convolved and divides a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, specifically including:

[0066] Step S1311: assign the values ​​of the odd rows and odd columns of the feature graph to be convolved to the corresponding positions of the first feature subgraph.

[0067] Step S1312: assign the values ​​of the odd rows and even columns of the feature graph to be convolved to the corresponding positions of the second feature subgraph.

[0068] Step S1313: assign the values ​​of the even rows and odd columns of the feature graph to be convolved to corresponding positions of the third feature subgraph.

[0069] Step S1314: assign the values ​​of the even rows and even columns of the feature graph to be convolved to the corresponding positions of the fourth feature sub-graph.

[0070] Exemplarily, the values ​​in the same row of the feature map to be convolved are also located in the same row in each feature sub-map, and the values ​​in the same column of the feature map to be convolved are also located in the same column in each feature sub-map.

[0071] like Figure 4 As shown, the obtained convolution feature map input Tensor is a convolution feature map of [1 6 4 4], the number of channels of the feature map to be convolved is 6, and the width and height are both 4. Four feature sub-maps are segmented from the feature map to be convolved according to the preset segmentation features.

[0072] In some embodiments, Figure 5 As shown, step S130 obtains the feature map to be convolved and segments a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, specifically including:

[0073] Step S131, obtaining the feature map to be convolved.

[0074] Exemplarily, the convolution feature map obtained is as follows Figure 6 shown.

[0075] Step S132: If the length or width of the acquired feature map to be convolved is not an integer multiple of the convolution step length, zero-padded is performed on the preset position of the feature map to be convolved so that the length or width of the feature map to be convolved after zero-padded is an integer multiple of the convolution step length.

[0076] In this embodiment, the length and width of the obtained convolution feature map are both 3, and zero padding is exemplarily performed on the right and bottom of the convolution feature map, so that the length and width of the feature map to be convolved after zero padding are 4.

[0077] Step S133, according to a preset feature map segmentation rule, a number of feature sub-maps are segmented from the zero-filled feature map to be convolved.

[0078] like Figure 6 As shown, according to the above steps S1311 to S1314, four feature sub-graphs are segmented from the feature graph to be convolved after zero padding.

[0079] In some embodiments, the structure of the feature map to be convolved is NCHW, such as [1 6 4 4], where N represents the number, C represents the number of channels, H represents the height, and W represents the width; therefore, when the number of instances batchsize=1, the number of channels channel=6, the height of the feature map to be convolved H=4, and the width of the feature map to be convolved W=4, the number of tensors to be convolved is 1, there are 6 channels, and each channel is a feature map to be convolved. The feature maps to be convolved of different channels under the same number can be first segmented and convolved, and then the feature maps to be convolved of different channels under the next number can be segmented and convolved.

[0080] Step S140: Based on the systolic array, convolution calculation is performed on the corresponding feature subgraphs according to the sub-filters, and the step length of the convolution calculation is 1.

[0081] The core concept of the systolic array is to allow data to flow in the array of computing units, reduce the number of memory accesses, make the structure more regular, the wiring more unified, and increase the frequency.

[0082] In some embodiments, Figure 7 As shown, the systolic array includes L×L processing units PE, and the systolic array is connected to the weight register filter buffer, the input register in buffer and the output register outbuffer. A first-in-first-out register FIFO is provided on the left side of each row of processing units PE and on the upper side of each column of processing units PE. The weights of the filter are stored and transmitted to all processing units PE in the same row through the first-in-first-out register FIFO. The processing units PE in the first row and the first column receive data from the feature map to be convolved in the input register, and the processing units PE in the first row and the first column transmit data from the feature map to be convolved to the processing units PE in the lower right corner. Such a design maximizes data reuse.

[0083] For example, Figure 8 As shown, the systolic array is based on a 3×3 filter W for a 5×5 feature Figure X Perform a 2D convolution.

[0084] Assume that the filter W and the feature Figure X There are the following forms:

[0085]

[0086] Among them, wi and xj represent the filter W and feature Figure X If a row of data is taken from the convolution operation, the three processing units PE in the last row will output three rows of convolution results:

[0087]

[0088] Where * indicates one-dimensional convolution calculation.

[0089] In some embodiments, Fig. 9 As shown, step S140 performs convolution calculation on the corresponding feature subgraphs based on the systolic array according to each of the sub-filters, specifically including:

[0090] Step S141, loading the weight of the sub-filter into a weight register connected to the systolic array.

[0091] Exemplarily, the weights of the sub-filters are loaded into the weight register filter buffer, and the weights of the sub-filters are stored through the first-in-first-out register FIFO and transmitted to the processing units PE in the same row.

[0092] Step S142: Load the characteristic subgraph corresponding to the sub-filter into an input register connected to the systolic array.

[0093] Exemplarily, the feature subgraph corresponding to the subfilter is loaded into the input register in buffer, and the processing elements PE in the first row and the first column of the systolic array receive data from the feature subgraph in the input register in buffer.

[0094] Step S143, obtaining the output result after the systolic array convolution calculation.

[0095] Exemplarily, the processing units PE in the first row and the first column of the systolic array transmit data from the feature subgraph to the processing units PE in the lower right corners of each of them; the processing units PE in the last row output the sub-filter to perform convolution calculation on the corresponding feature subgraph, and the convolution result with a convolution step size of 1.

[0096] like Figure 3 As shown, the weight of the first sub-filter is w1. Figure 4 The first feature subgraph corresponding to it is convolved; the weight of the second sub-filter is w2, and the second feature subgraph is convolved; the weight of the third sub-filter is w3, and the third feature subgraph is convolved; the weight of the fourth sub-filter is w4, and the fourth feature subgraph is convolved. The results of the convolution calculations corresponding to the first to fourth sub-filters are as follows:

[0097]

[0098] Step S150: superimpose the convolution calculation results corresponding to each of the sub-filters, and output the superimposed result as the result of the convolution calculation of the feature map to be convolved by the convolution filter.

[0099] Exemplarily, the convolution calculation results corresponding to the four sub-filters are superimposed to obtain:

[0100]

[0101] If directly based on Figure 3 The convolution filter pair on the left Figure 4 The convolution feature map on the left is convolved with a convolution step size of 2, and the result of the convolution calculation is:

[0102]

[0103] Therefore, the neural network acceleration method based on the systolic array of this embodiment can perform convolution calculation with a convolution step size of 1 by dividing a plurality of sub-filters from the convolution filter according to a preset filter segmentation rule when the convolution step size is not 1, and dividing a plurality of feature sub-graphs from the feature graph to be convolved according to a preset feature graph segmentation rule. The superposition result of the convolution calculation results corresponding to each sub-filter is the same as the convolution calculation result of the convolution step size not being 1 performed on the feature graph to be convolved according to the original convolution filter, that is, the two convolution calculations before and after the segmentation operation are equivalent; therefore, the superposition result can be used as the result of the convolution calculation of the feature graph to be convolved by the convolution filter to output for subsequent processing such as convolution, pooling, classification, etc. again; however, since the convolution step size is 1 after the segmentation operation, the computing power of the systolic array can be more fully utilized.

[0104] For example, Fig.10 and Fig.11 As shown, in step S120, if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule, specifically including:

[0105] Step S122: If the convolution step size is 2 and the size of the convolution filter is 3×3, four sub-filters are divided from the convolution filter, and the size of each sub-filter is 2×2.

[0106] The first sub-filter includes the weights of odd rows and odd columns of the convolution filter, the second sub-filter includes the weights of odd rows and even columns of the convolution filter, the third sub-filter includes the weights of even rows and odd columns of the convolution filter, and the fourth sub-filter includes the weights of even rows and even columns of the convolution filter.

[0107] In some embodiments, the size of the convolution filter kernel (filter) cannot be divided evenly by the convolution stride, and zero padding can be performed at a preset position of the convolution filter so that the length or width of the convolution filter after zero padding is an integer multiple of the convolution stride. In this embodiment, the size of the convolution filter is 3×3, the convolution stride is 2, and the size of the convolution filter cannot be divided evenly by the convolution stride. Zero padding can be performed so that the length or width of the convolution filter after zero padding is an integer multiple of the convolution stride, so that the convolution filter can be divided into several sub-filters according to a preset filter segmentation rule.

[0108] Specifically, Fig.11 and Fig.12As shown, if the convolution step size is 2 and the size of the convolution filter is 3×3, 4 sub-filters are divided from the convolution filter, and the size of each sub-filter is 2×2, specifically including:

[0109] Step S11, allocating the weights of the odd rows and odd columns of the convolution filter to the first sub-filter.

[0110] Step S12: Allocate the weights of the odd rows and even columns of the convolution filter to the first column of the second sub-filter, and fill the second column of the second sub-filter with 0.

[0111] Step S13: distribute the weights of the even rows and odd columns of the convolution filter to the first row of the third sub-filter, and fill the second row of the third sub-filter with 0.

[0112] Step S14: distribute the weights of the even rows and even columns of the convolution filter to the first row and first column of the fourth sub-filter, and fill the remaining positions of the fourth sub-filter with 0.

[0113] In this embodiment, if Fig.10 and Fig.13 As shown, if the convolution step size is 2 and the size of the convolution filter is 3×3, step S130 obtains the feature map to be convolved and divides a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, specifically including:

[0114] Step S1321: assign the values ​​of the odd rows and odd columns of the feature graph to be convolved to the corresponding positions of the first feature sub-graph.

[0115] Step S1322: assign the values ​​of the odd rows and even columns of the feature graph to be convolved to the corresponding positions of the second feature subgraph.

[0116] Step S1323: assign the values ​​of the even rows and odd columns of the feature graph to be convolved to corresponding positions of the third feature sub-graph.

[0117] Step S1324: assign the values ​​of the even rows and even columns of the feature graph to be convolved to the corresponding positions of the fourth feature sub-graph.

[0118] When the convolution step is 2 and the size of the convolution filter is 3×3, 4 feature sub-graphs are segmented from the feature graph to be convolved according to a preset feature graph segmentation rule; if the number of channels of the feature graph to be convolved is 1, the number of channels after segmentation is 4.

[0119] In some embodiments, Fig.14 and Fig.15As shown, in step S120, if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule, specifically including:

[0120] Step S123: If the convolution step size is 3 and the size of the convolution filter is 3×3, 9 sub-filters are divided from the convolution filter, each of which has a size of 1×1 and includes one of the 9 weights of the convolution filter.

[0121] Exemplarily, the weights of the first row and first column of the convolution filter are assigned to the first 1×1 sub-filter, the weights of the first row and second column of the convolution filter are assigned to the second 1×1 sub-filter, the weights of the first row and third column of the convolution filter are assigned to the third 1×1 sub-filter, the weights of the second row and first column of the convolution filter are assigned to the fourth 1×1 sub-filter, the weights of the second row and second column of the convolution filter are assigned to the fifth 1×1 sub-filter, and so on.

[0122] In this embodiment, if Fig.16 and Fig.17 As shown, if the convolution step is 3 and the size of the convolution filter is 3×3, step S130 obtains the feature map to be convolved and divides a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, specifically including:

[0123] Step S1331: assign the value of the 3n+1th row and the 3n+1th column of the feature graph to be convolved to the corresponding position of the first feature subgraph, where n is a natural number.

[0124] Step S1332: assign the value of the 3n+1th row and the 3n+2th column of the feature graph to be convolved to the corresponding position of the second feature sub-graph.

[0125] Step S1333: assign the value of the 3n+1th row and the 3n+3th column of the feature graph to be convolved to the corresponding position of the third feature sub-graph.

[0126] Step S1334: assign the value of the 3n+2th row and the 3n+1th column of the feature graph to be convolved to the corresponding position of the fourth feature sub-graph.

[0127] Step S1335: assign the value of the 3n+2th row and the 3n+2th column of the feature graph to be convolved to the corresponding position of the fifth feature sub-graph.

[0128] Step S1336: assign the value of the 3n+2th row and the 3n+3th column of the feature graph to be convolved to the corresponding position of the sixth feature sub-graph.

[0129] Step S1337: assign the value of the 3n+3th row and the 3n+1th column of the feature graph to be convolved to the corresponding position of the seventh feature sub-graph.

[0130] Step S1338: assign the value of the 3n+3th row and the 3n+2th column of the feature graph to be convolved to the corresponding position of the eighth feature sub-graph.

[0131] Step S1339: assign the value of the 3n+3th row and the 3n+3th column of the feature graph to be convolved to the corresponding position of the ninth feature sub-graph.

[0132] For example, Fig.17 As shown, the length and width of the acquired feature map to be convolved are both 8, which are not integer multiples of the convolution step, that is, 3. Then, zeros are padded at the preset positions of the feature map to be convolved so that the length or width of the feature map to be convolved after the zero padding is an integer multiple of the convolution step; then, 9 feature sub-maps are segmented from the feature map to be convolved after the zero padding according to the preset feature map segmentation rule.

[0133] The neural network acceleration method based on systolic array of the present application can perform convolution calculation with a convolution step of 1 by dividing a number of sub-filters from the convolution filter according to a preset filter division rule when the convolution step is not 1, and dividing a number of feature sub-graphs from the feature graph to be convolved according to a preset feature graph division rule. It can be well adapted to the structure of systolic arrays (Systolic Array) that are used at the bottom layer of some special dedicated deep network accelerators such as FPGA and NPU, which can save computing resources, and this segmentation method itself is a special computing logic that can be integrated into various deep learning frameworks. The segmentation transformation method provided by the present application does not affect the forward and backward paths of the deep network itself, and because it saves computing resources, it actually improves the speed of training and reasoning.

[0134] In some embodiments, Fig.18 Shown is a schematic diagram of segmentation transformation of the downsampled topological structure of the traditional deep convolutional neural network ResNet50 according to the systolic array-based neural network acceleration method of the present application; the left side of the arrow is a simplified model of the downsampled topological structure part of the traditional deep convolutional neural network ResNet50, and the left side of the arrow is the computational topological structure after equivalent transformation through the segmentation transformation.

[0135] Compared with the computational graph structure of traditional deep convolutional neural networks, the computational topology structure after the equivalent transformation of the segmentation transformation has the following advantages:

[0136] 1. The two 1×1 mapping convolutions on the left side of the traditional ResNet50 are omitted to reduce computing resources.

[0137] 2. The residual component on the right side of the traditional ResNet50 can be converted into a direct identity mapping (IdentityMapping), which is conducive to the propagation of the residual.

[0138] The neural network acceleration method based on pulsation array of the present application can be applied to many network models, such as densNet, shakeshake network, etc. As long as the network exists in the downsampling part, the neural network acceleration method provided by the present application can be used for transformation and then calculation training can be performed.

[0139] See also Fig.19 , Fig.19 It is a structural schematic diagram of a neural network acceleration device based on a systolic array provided in one embodiment of the present application. The neural network acceleration device based on a systolic array can be configured in a server to execute the aforementioned neural network acceleration method based on a systolic array.

[0140] like Fig.19 As shown, the neural network acceleration device based on the systolic array includes:

[0141] The convolution parameter acquisition module 110 is used to acquire the convolution parameters of the convolution filter, where the convolution parameters include the convolution step size and the size of the convolution filter.

[0142] The filter segmentation module 120 is used to segment the convolution filter into a plurality of sub-filters according to a preset filter segmentation rule if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, and the size of each sub-filter is smaller than the size of the convolution filter.

[0143] The feature map segmentation module 130 is used to obtain the feature map to be convolved and segment a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, wherein the plurality of feature sub-maps correspond to the plurality of sub-filters one by one.

[0144] The convolution module 140 is used to perform convolution calculation on the corresponding feature subgraphs according to the sub-filters based on the systolic array, and the step size of the convolution calculation is 1.

[0145] The superposition module 150 is used to superimpose the convolution calculation results corresponding to each of the sub-filters, and output the superposition result as the result of the convolution calculation of the feature map to be convolved by the convolution filter.

[0146] In some embodiments, Fig. 20 As shown, the feature map segmentation module 130 includes:

[0147] The feature map acquisition submodule 131 is used to obtain the feature map to be convolved.

[0148] The zero-padding submodule 132 is used to fill the preset position of the feature map to be convolved with zeros if the length or width of the acquired feature map to be convolved is not an integer multiple of the convolution step length so that the length or width of the feature map to be convolved after zero-padding is an integer multiple of the convolution step length.

[0149] The feature map segmentation submodule 133 is used to segment a plurality of feature sub-maps from the zero-filled feature map to be convolved according to a preset feature map segmentation rule.

[0150] In some embodiments, Fig. 20 As shown, the convolution module 140 includes:

[0151] A weight loading submodule 141, used to load the weight of the sub-filter into a weight register connected to the systolic array;

[0152] The sub-graph loading sub-module 142 is used to load the characteristic sub-graph corresponding to the sub-filter into an input register connected to the systolic array.

[0153] The output submodule 143 is used to obtain the output result after the systolic array convolution calculation.

[0154] In some embodiments, Fig. 20 As shown, the filter segmentation module 120 includes a first filter segmentation submodule 121, which is used to segment 4 sub-filters from the convolution filter if the convolution step is 2 and the size of the convolution filter is 2×2, and the size of each sub-filter is 1×1; wherein the first sub-filter includes the weights of odd rows and odd columns of the convolution filter, the second sub-filter includes the weights of odd rows and even columns of the convolution filter, the third sub-filter includes the weights of even rows and odd columns of the convolution filter, and the fourth sub-filter includes the weights of even rows and even columns of the convolution filter.

[0155] The feature map segmentation module 130 includes a first feature map segmentation submodule 1301, which is used to assign the values ​​of the odd rows and odd columns of the feature map to be convolved to the corresponding positions of the first feature submap, assign the values ​​of the odd rows and even columns of the feature map to be convolved to the corresponding positions of the second feature submap, assign the values ​​of the even rows and odd columns of the feature map to be convolved to the corresponding positions of the third feature submap, and assign the values ​​of the even rows and even columns of the feature map to be convolved to the corresponding positions of the fourth feature submap if the convolution step size is 2 and the size of the convolution filter is 2×2.

[0156] In some embodiments, Fig. 20As shown, the filter segmentation module 120 includes a second filter segmentation submodule 122, which is used to segment 4 sub-filters from the convolution filter if the convolution step size is 2 and the size of the convolution filter is 3×3, and the size of each sub-filter is 2×2; wherein the first sub-filter includes the weights of odd rows and odd columns of the convolution filter, the second sub-filter includes the weights of odd rows and even columns of the convolution filter, the third sub-filter includes the weights of even rows and odd columns of the convolution filter, and the fourth sub-filter includes the weights of even rows and even columns of the convolution filter.

[0157] The feature map segmentation module 130 includes a second feature map segmentation submodule 1302, which is used to assign the values ​​of the odd rows and odd columns of the feature map to be convolved to the corresponding positions of the first feature submap, assign the values ​​of the odd rows and even columns of the feature map to be convolved to the corresponding positions of the second feature submap, assign the values ​​of the even rows and odd columns of the feature map to be convolved to the corresponding positions of the third feature submap, and assign the values ​​of the even rows and even columns of the feature map to be convolved to the corresponding positions of the fourth feature submap if the convolution step size is 2 and the size of the convolution filter is 3×3.

[0158] In some embodiments, Fig. 20 As shown, the filter segmentation module 120 includes a third filter segmentation submodule 123, which is used to segment 9 sub-filters from the convolution filter if the convolution step is 3 and the size of the convolution filter is 3×3, and each of the sub-filters has a size of 1×1 and includes one of the 9 weights of the convolution filter.

[0159] The feature map segmentation module 130 includes a third feature map segmentation submodule 1303, which is used to assign the value of the 3n+1th row and the 3n+1th column of the feature map to be convolved to the corresponding position of the first feature submap, assign the value of the 3n+1th row and the 3n+2th column of the feature map to be convolved to the corresponding position of the second feature submap, assign the value of the 3n+1th row and the 3n+3th column of the feature map to be convolved to the corresponding position of the third feature submap, and assign the value of the 3n+2th row and the 3n+1th column of the feature map to be convolved to the corresponding position of the fourth feature submap if the convolution step size is 3 and the size of the convolution filter is 3×3. Position, assign the value of the 3n+2th row and 3n+2th column of the feature map to be convolved to the corresponding position of the fifth feature submap, assign the value of the 3n+2th row and 3n+3th column of the feature map to be convolved to the corresponding position of the sixth feature submap, assign the value of the 3n+3th row and 3n+1th column of the feature map to be convolved to the corresponding position of the seventh feature submap, assign the value of the 3n+3th row and 3n+2th column of the feature map to be convolved to the corresponding position of the eighth feature submap, and assign the value of the 3n+3th row and 3n+3th column of the feature map to be convolved to the corresponding position of the ninth feature submap, where n is a natural number.

[0160] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0161] The method and apparatus of the present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.

[0162] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Fig.21 Runs on the computer device shown.

[0163] See also Fig.21 , Fig.21 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.

[0164] See also Fig.21 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0165] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any neural network acceleration method based on a systolic array.

[0166] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0167] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by a processor, the processor can execute any neural network acceleration method based on a systolic array.

[0168] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0169] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0170] In one embodiment, the processor is used to run a computer program stored in a memory to implement the steps of the aforementioned neural network acceleration method based on a systolic array.

[0171] Exemplarily, the processor is used to run a computer program stored in the memory to implement the following steps:

[0172] Acquire convolution parameters of a convolution filter, wherein the convolution parameters include a convolution step size and a size of the convolution filter;

[0173] If the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are divided from the convolution filter according to a preset filter division rule, and the size of each sub-filter is smaller than the size of the convolution filter;

[0174] Acquire a feature map to be convolved and segment a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, wherein the plurality of feature sub-maps correspond one-to-one to the plurality of sub-filters;

[0175] Based on the systolic array, convolution calculation is performed on the corresponding feature subgraphs according to each of the sub-filters, and the step size of the convolution calculation is 1;

[0176] The convolution calculation results corresponding to each of the sub-filters are superimposed, and the superimposed result is output as the result of the convolution calculation of the feature map to be convolved by the convolution filter.

[0177] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments, such as:

[0178] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any one of the neural network acceleration methods based on a systolic array provided in the embodiments of the present application.

[0179] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0180] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A neural network acceleration method based on a systolic array, characterized in that: include: Acquire convolution parameters of a convolution filter, wherein the convolution parameters include a convolution step size and a size of the convolution filter; If the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, a plurality of sub-filters are divided from the convolution filter according to a preset filter division rule, and the size of each sub-filter is smaller than the size of the convolution filter; Acquire a feature map to be convolved and segment a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, wherein the plurality of feature sub-maps correspond one-to-one to the plurality of sub-filters; Based on the systolic array, convolution calculation is performed on the corresponding feature subgraphs according to each of the sub-filters, and the step size of the convolution calculation is 1; The convolution calculation results corresponding to each of the sub-filters are superimposed, and the superimposed result is output as the result of the convolution calculation of the feature map to be convolved by the convolution filter; The method of performing convolution calculation on the corresponding feature subgraphs based on the systolic array according to the sub-filters includes: loading the weights of the sub-filters into weight registers connected to the systolic array; Loading a feature subgraph corresponding to the subfilter into an input register connected to the systolic array; Obtaining an output result after the systolic array convolution calculation; The weight of the sub-filter is transmitted to all processing units in the same row of the systolic array through the weight register, the processing units in the first row and the first column of the systolic array receive the data of the feature sub-graph corresponding to the sub-filter from the input register, and the processing units in the first row and the first column of the systolic array transmit the data from the feature sub-graph corresponding to the sub-filter to the processing units in the lower right corners thereof.

2. The neural network acceleration method according to claim 1, characterized in that: The step of obtaining a feature map to be convolved and segmenting a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule specifically includes: Get the feature map to be convolved; If the length or width of the acquired feature map to be convolved is not an integer multiple of the convolution step length, padding the preset position of the feature map to be convolved with zeros so that the length or width of the feature map to be convolved after the zero padding is an integer multiple of the convolution step length; According to the preset feature map segmentation rule, several feature sub-maps are segmented from the zero-filled feature map to be convolved.

3. The neural network acceleration method according to claim 2, characterized in that: If the convolution step size is not 1 and the size of the convolution filter is greater than 1, a plurality of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule, specifically including: If the convolution step size is 2 and the size of the convolution filter is 2×2, four sub-filters are divided from the convolution filter, and the size of each sub-filter is 1×1; wherein the first sub-filter includes the weights of the odd rows and odd columns of the convolution filter, the second sub-filter includes the weights of the odd rows and even columns of the convolution filter, the third sub-filter includes the weights of the even rows and odd columns of the convolution filter, and the fourth sub-filter includes the weights of the even rows and even columns of the convolution filter; If the convolution step size is 2 and the size of the convolution filter is 2×2, obtaining the feature map to be convolved and segmenting a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule specifically includes: Assign the values ​​of the odd rows and odd columns of the feature graph to be convolved to the corresponding positions of the first feature subgraph, assign the values ​​of the odd rows and even columns of the feature graph to be convolved to the corresponding positions of the second feature subgraph, assign the values ​​of the even rows and odd columns of the feature graph to be convolved to the corresponding positions of the third feature subgraph, and assign the values ​​of the even rows and even columns of the feature graph to be convolved to the corresponding positions of the fourth feature subgraph.

4. The neural network acceleration method according to claim 2, characterized in that: If the convolution step size is not 1 and the size of the convolution filter is greater than 1, a plurality of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule, specifically including: If the convolution step size is 2 and the size of the convolution filter is 3×3, four sub-filters are divided from the convolution filter, and the size of each sub-filter is 2×2; wherein the first sub-filter includes the weights of the odd rows and odd columns of the convolution filter, the second sub-filter includes the weights of the odd rows and even columns of the convolution filter, the third sub-filter includes the weights of the even rows and odd columns of the convolution filter, and the fourth sub-filter includes the weights of the even rows and even columns of the convolution filter; If the convolution step size is 2 and the size of the convolution filter is 3×3, obtaining the feature map to be convolved and segmenting a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule specifically includes: Assign the values ​​of the odd rows and odd columns of the feature graph to be convolved to the corresponding positions of the first feature subgraph, assign the values ​​of the odd rows and even columns of the feature graph to be convolved to the corresponding positions of the second feature subgraph, assign the values ​​of the even rows and odd columns of the feature graph to be convolved to the corresponding positions of the third feature subgraph, and assign the values ​​of the even rows and even columns of the feature graph to be convolved to the corresponding positions of the fourth feature subgraph.

5. The neural network acceleration method according to claim 4, characterized in that: If the convolution step size is 2 and the size of the convolution filter is 3×3, four sub-filters are divided from the convolution filter, and the size of each sub-filter is 2×2, specifically including: Allocating the weights of the odd-numbered rows and columns of the convolution filter to the first sub-filter; Assign the weights of the odd rows and even columns of the convolution filter to the first column of the second sub-filter, and fill the second column of the second sub-filter with 0; Assign the weights of the even rows and odd columns of the convolution filter to the first row of the third sub-filter, and fill the second row of the third sub-filter with 0; The weights of the even rows and even columns of the convolution filter are allocated to the first row and first column of the fourth sub-filter, and the remaining positions of the fourth sub-filter are filled with 0.

6. The neural network acceleration method according to claim 2, characterized in that: If the convolution step size is not 1 and the size of the convolution filter is greater than 1, a plurality of sub-filters are segmented from the convolution filter according to a preset filter segmentation rule, specifically including: If the convolution step is 3 and the size of the convolution filter is 3×3, 9 sub-filters are divided from the convolution filter, each of which has a size of 1×1 and includes one of the 9 weights of the convolution filter; If the convolution step is 3 and the size of the convolution filter is 3×3, obtaining the feature map to be convolved and segmenting a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule specifically includes: Assign the value of the 3n+1th row and 3n+1th column of the feature map to be convolved to the corresponding position of the first feature sub-map, assign the value of the 3n+1th row and 3n+2th column of the feature map to be convolved to the corresponding position of the second feature sub-map, assign the value of the 3n+1th row and 3n+3th column of the feature map to be convolved to the corresponding position of the third feature sub-map, assign the value of the 3n+2th row and 3n+1th column of the feature map to be convolved to the corresponding position of the fourth feature sub-map, assign the value of the 3n+2th row and 3n+2 ...3th row and 3n+3th column of the feature map to be convolved to the corresponding position of the third feature sub-map, assign the value of the 3n+2th row and 3n+1th column of the feature map to be convolved to the corresponding position of the fourth feature sub-map, assign the value of the 3n+3th row and 3n+2th column of the feature map to be convolved to the corresponding position of the fourth feature sub-map, assign the value of the 3n+3th row and 3n+3th column of the feature map to be convolved to the corresponding position of the third feature sub-map, assign the value of the 3n+3th row and 3n+3th column of the feature map to be convolved to the corresponding position of the fourth feature sub-map, assign the value of the 3n+3th row and 3n+3 Assign to the corresponding position of the fifth feature subgraph, assign the value of the 3n+2th row and 3n+3th column of the feature graph to be convolved to the corresponding position of the sixth feature subgraph, assign the value of the 3n+3th row and 3n+1th column of the feature graph to be convolved to the corresponding position of the seventh feature subgraph, assign the value of the 3n+3th row and 3n+2th column of the feature graph to be convolved to the corresponding position of the eighth feature subgraph, assign the value of the 3n+3th row and 3n+3th column of the feature graph to be convolved to the corresponding position of the ninth feature subgraph, where n is a natural number.

7. A neural network acceleration device based on a systolic array, characterized in that: include: A convolution parameter acquisition module, used to acquire convolution parameters of a convolution filter, wherein the convolution parameters include a convolution step size and a size of the convolution filter; A filter segmentation module, configured to segment the convolution filter into a plurality of sub-filters according to a preset filter segmentation rule if the convolution step size is not 1 and the size of the convolution filter is greater than 1×1, wherein the size of each sub-filter is smaller than the size of the convolution filter; A feature map segmentation module, used to obtain the feature map to be convolved and segment a plurality of feature sub-maps from the feature map to be convolved according to a preset feature map segmentation rule, wherein the plurality of feature sub-maps correspond to the plurality of sub-filters one by one; A convolution module, used for performing convolution calculation on the corresponding feature subgraphs according to the sub-filters based on the systolic array, and the step length of the convolution calculation is 1; A superposition module, used to superimpose the convolution calculation results corresponding to each of the sub-filters, and output the superposition result as the result of the convolution calculation of the feature map to be convolved by the convolution filter; The method of performing convolution calculation on the corresponding feature subgraphs based on the systolic array according to the sub-filters includes: loading the weights of the sub-filters into weight registers connected to the systolic array; Loading a feature subgraph corresponding to the subfilter into an input register connected to the systolic array; Obtaining an output result after the systolic array convolution calculation; The weight of the sub-filter is transmitted to all processing units in the same row of the systolic array through the weight register, the processing units in the first row and the first column of the systolic array receive the data of the feature sub-graph corresponding to the sub-filter from the input register, and the processing units in the first row and the first column of the systolic array transmit the data from the feature sub-graph corresponding to the sub-filter to the processing units in the lower right corners thereof.

8. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the neural network acceleration method based on the systolic array as described in any one of claims 1-6 when executing the computer program.

9. A computer-readable storage medium storing a computer program, characterized in that: If the computer program is executed by a processor, the neural network acceleration method based on a systolic array as described in any one of claims 1 to 6 is implemented.