Calculation device and calculation method
The computing device optimizes CNN performance by reducing overlapping data operations between units through data transmission and reception, enhancing execution time and power efficiency in convolutional neural networks.
Patent Information
- Application Number
- JP2024505991
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-03-09
- Filing Date
- 2023-02-15
- Publication Date
- 2026-01-14
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Conventional FUSE execution in convolutional neural networks (CNNs) results in increased computational effort and deteriorated power-performance ratio due to extensive overlapping data operations between adjacent computing units, especially with multiple layers.
A computing device with multiple computing units that perform convolution operations on divided data, allowing for data transmission and reception between adjacent units to reduce overlapping operations, thereby optimizing the execution time and power performance.
The solution effectively reduces the amount of calculation required for convolution operations, shortening execution time and improving the power-performance ratio by minimizing overlapping operations between computing units.
Smart Images

Figure 0007798172000001 
Figure 0007798172000002 
Figure 0007798172000003
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS FIELD OF THE DISCLOSURE The present disclosure relates to a computing device and a computing method.
[0002] This application is based on and claims the benefit of priority from Patent Application No. 2022-036319, filed March 9, 2022, the entire contents of which are incorporated herein by reference. [Background technology]
[0003] In recent years, research and development into convolutional neural networks (CNNs) has been accelerating. For example, a computing device has been developed that performs parallel distributed processing on multiple computing units arranged two-dimensionally, dividing input data into multiple pieces of data (hereinafter referred to as "tiles"), and each computing unit performs a convolution operation on each of the pieces of data.
[0004] Non-Patent Document 1 proposes a hardware-based acceleration method for CNN, in which convolution operations are performed on input data by fusing multiple layers without writing data (intermediate data) obtained by layer-by-layer operations to external memory. That is, the method described in Non-Patent Document 1 reduces the amount of data transferred to external memory by continuously performing convolution operations for each tile in the layer direction, and is hereinafter referred to as Fuse execution. [Prior art documents] [Patent documents]
[0005] [Non-Patent Document 1] M. Alwani, H. Chen, M. Ferdman, and PA "Fused-Layer CNN Accelerators", 2016 49th Annual IEEE / ACM International Symposium on Microarchitecture (MICRO) Summary of the Invention [Problem to be solved by the invention]
[0006] Here, CNN requires an overlapping area where the edges of adjacent tiles overlap. This overlapping area is data (hereinafter also referred to as "overlapping data") required for convolutional calculations using a sliding filter (sliding window). For this reason, in a CNN using a calculation device in which multiple calculation units are arranged in a two-dimensional manner, when each calculation unit executes calculations for each layer, calculations on overlapping data must be performed between adjacent calculation units.
[0007] In FUSE execution, intermediate data is not written to external memory, so the divided data area to be processed in the first layer is determined by anticipating the overlapping data that will be required in the last layer.
[0008] Duplicate data in conventional FUSE execution will be described with reference to Figure 9. In Figure 9, Activation 0, Activation 1, and Activation 2 each correspond to an operation in one layer. That is, if the operation in the first layer is Activation 0, the operation performed by inputting the operation result of Activation 0 to the next layer is Activation 1, and the operation performed by inputting the operation result of Activation 1 to the next layer is Activation 2. In Figure 9, Activation 2 is the operation in the last layer.
[0009] The overlapping data between data 100A and data 100B that are the targets of the operation in Activation 0 is denoted by reference numeral 100C. The overlapping data between data 102A and data 102B that are the targets of the operation in Activation 1 is denoted by reference numeral 102C. The overlapping data between data 104A and data 104B that are the targets of the operation in Activation 2 is denoted by reference numeral 104C. In FUSE execution, as described above, intermediate data is not written to external memory, so the data area for overlapping data 100C in Activation 0 is determined in advance based on the overlapping data 102C and 104C required in each layer up to Activation 2, which corresponds to the final layer.
[0010] Therefore, in FUSE execution, the more layers there are, the larger the amount of overlapping data becomes, and the more computational effort there is for the overlapping data. As a result, the effect of FUSE execution in reducing the execution time of computations decreases, and the power-performance ratio deteriorates.
[0011] In view of the above background, an object of the present disclosure is to provide a computing device and a computing method that can reduce overlapping operations between computing units in a convolution operation using Fuse execution. [Means for solving the problem]
[0012] The present disclosure employs the following technical solutions to solve the above problems. The reference symbols in parentheses in the claims are examples showing the correspondence with specific solutions described in the embodiments below as one aspect, and do not limit the technical scope of the present disclosure.
[0013] A computing device according to one aspect of the present disclosure is a computing device that is composed of a plurality of computing units, each of which performs an operation on each of the divided data pieces obtained by dividing input data into a plurality of pieces, and in which the computing units successively perform convolution operations for each of a plurality of layers on the divided data. The computing units each include a computing unit that performs the convolution operation for each of the layer on the divided data, a transmitting unit that transmits data to another adjacent computing unit, and a receiving unit that receives data from the other adjacent computing unit. Each time a convolution operation for each of the layer is completed, the computing unit transmits specified data required for the next operation of the layer to the other adjacent computing unit, and performs the next convolution operation of the layer based on the specified data received from the adjacent computing unit and the result of the previous operation of the layer.
[0014] This configuration can suppress overlapping operations between processors during convolution operations using Fuse execution. As a result, the amount of calculation required for the convolution operations can be reduced, shortening the execution time and improving the power performance ratio.
[0015] A computing method according to one embodiment of the present disclosure is a computing method using a computing device that is composed of a plurality of computing units, each of which performs an operation on each of divided data obtained by dividing input data into a plurality of pieces, and in which the computing units successively perform convolution operations for each of a plurality of layers on the divided data, the computing unit having the following steps: a first step in which the computing unit performs a convolution operation for each of the input divided data by the layer; a second step in which the computing unit transmits to another adjacent computing unit, each time the computing unit completes a convolution operation for each of the layers, specific data required for the next computation for the layer in the adjacent computing unit; and a third step in which the computing unit performs a convolution operation for the next layer based on the specific data received from the adjacent computing unit and the result of the previous computation for the layer. [Effects of the Invention]
[0016] According to the present disclosure, it is possible to reduce overlapping operations between computing units in convolution operations using Fuse execution. [Brief explanation of the drawings]
[0017] [Figure 1] FIG. 1 is a schematic configuration diagram of a calculation device according to a first embodiment. [Figure 2] FIG. 2 is a schematic configuration diagram of a PE according to the first embodiment. [Figure 3] 1A and 1B are schematic diagrams showing transmission and reception of overlapping data by a PE according to the first embodiment, in which (A) shows the initial layer and (B) shows the second and subsequent layers. [Figure 4] FIG. 11 is a schematic diagram showing allocation of tiles to PEs in the second embodiment. [Figure 5] FIG. 11 is a schematic diagram showing exchange of overlapping data from the start layer to the final layer in the second embodiment. [Figure 6] FIG. 10 is a functional block diagram of an information processing apparatus according to a second embodiment. [Figure 7] FIG. 10 is a schematic diagram showing another example of allocation of tiles to PEs in the second embodiment. [Figure 8] FIG. 11 is a schematic diagram showing allocation of tiles to PEs in the third embodiment. [Figure 9] FIG. 1 is a schematic diagram showing duplicated data in conventional FUSE execution. DETAILED DESCRIPTION OF THE INVENTION
[0018] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. Note that the embodiments described below are examples of how the present disclosure may be implemented, and the present disclosure is not limited to the specific configurations described below. When implementing the present disclosure, specific configurations according to the embodiments may be appropriately adopted.
[0019] (First embodiment) FIG. 1 is a schematic diagram of a computing device 10 according to this embodiment. The computing device 10 according to this embodiment includes a plurality of processing elements (hereinafter referred to as "PEs") 12, which are computing machines, and performs computations based on a convolutional neural network (CNN). Each PE 12 receives input data (hereinafter referred to as "tiles") obtained by dividing input data, which is multidimensional array data, into a plurality of pieces, and performs a convolution computation for each input tile by parallel distributed processing. In this embodiment, as an example, the number of tiles into which the input data is divided is the same as the number of PEs 12 included in the computing device 10. The multidimensional array data is so-called tensor data, and in this embodiment, it is assumed to be image data as an example. The multidimensional array data is not limited to three-dimensional array data such as image data, but may be n-dimensional array data.
[0020] The PEs 12 are arranged two-dimensionally with n rows and m columns, and perform parallel distributed processing. In this embodiment, in order to distinguish between the PEs 12, as an example, the PE 12 located in the upper left of FIG. 1 is assigned numbers n=0, m=0, and n increases toward the bottom of FIG. 1 and m increases toward the right of FIG. 1. In FIG. 1, as an example, the arithmetic device 10 is configured with a total of 15 PEs 12 arranged in 3 rows and 5 columns, but the number and arrangement of the PEs 12 are not limited to this.
[0021] The arithmetic device 10 of this embodiment performs CNN on data (for example, image data) input from the external memory 14, and outputs the results to the external memory 14.
[0022] In the arithmetic device 10 of this embodiment, the PE 12 successively executes convolution operations for each of a plurality of layers on a tile (hereinafter referred to as "Fuse execution"). Note that in Fuse execution, intermediate data, which is the operation result obtained by the convolution operations for each layer on a tile, is not written to the external memory 14, so the amount of data transferred to the external memory 14 can be reduced, thereby reducing the execution time of the operations.
[0023] In a CNN using a calculation device 10 in which a plurality of PEs 12 are arranged two-dimensionally as in this embodiment, when each PE 12 executes a calculation for each layer, it is necessary to calculate data that overlaps with adjacent PEs 12 (hereinafter referred to as "overlapping data"). This overlapping data is data required to perform a convolution calculation using a sliding filter (hereinafter referred to as "sliding window").
[0024] In conventional FUSE execution, intermediate data is not written to external memory 14, so the overlapping data area required in the last layer is estimated in advance and the divided data area to be processed in the first layer is determined. Therefore, in conventional FUSE execution, the greater the number of layers, the larger the overlapping data becomes, and the greater the amount of calculation of the overlapping data by the computing unit. In the following explanation, the first layer is referred to as the start layer, and the last layer is referred to as the final layer.
[0025] Therefore, in the arithmetic device 10 of this embodiment, adjacent PEs 12 can transmit and receive data to each other, and a PE 12 transmits data required for the calculation of the next layer to another adjacent PE 12. The data required for the next layer is data that overlaps between adjacent PEs 12. Specifically, this data is data on the periphery of the data obtained by the convolution calculation for each layer by the PE 12, and is determined according to the size of the sliding window.
[0026] FIG. 2 is a schematic configuration diagram of the PE 12 of this embodiment.
[0027] The PE 12 includes an ALU (Arithmetic and Logic Unit) 20, an internal RAM (Random Access Memory) 22, a transmitter 24, a receiver 26, and a queue 28.
[0028] The ALU 20 is a calculation unit that performs a convolution calculation for each layer on the input tiles. The ALU 20 of this embodiment performs Fuse execution on the input tiles.
[0029] The internal RAM 22 is a storage unit that stores the calculation results for each layer obtained by executing Fuse, data received from other PEs 12, and the like.
[0030] The transmitter 24 transmits data to other adjacent PEs 12. The receiver 26 receives data from other adjacent PEs 12. The PE 12 of this embodiment transmits and receives overlapping data to and from other adjacent PEs 12 via the transmitter 24 and the receiver 26.
[0031] A command indicating the relationship between the duplicate data to be transmitted and the PE 12 to which the duplicate data is to be transmitted is registered in the queue 28. That is, the transmitting unit 24 transmits the duplicate data to another adjacent PE 12 in accordance with this command.
[0032] Next, transmission and reception of overlapping data by the PE 12 executed by Fuse execution in this embodiment will be described with reference to FIGS.
[0033] First, the data input to the starting layer among the multiple layers is a tile obtained by dividing the input data into multiple pieces. In the following explanation, the multiple pieces of data that make up the tile are called neuron data. Also, the neuron data that make up the tile input to PE12 are called input neuron data, and the neuron data that make up the calculation result by PE12 are called output neuron data.
[0034] In this embodiment, tiles input to the PE 12 include overlapping neuron data between adjacent PEs 12 so as to correspond only to the convolution operation in the starting layer. That is, in the FUSE execution of this embodiment, overlapping data is received from adjacent PEs 12 in the second and subsequent layer operations, so there is no need to include overlapping data in tiles according to the number of layers as in the conventional FUSE execution. However, tiles to be operated in the starting layer cannot receive overlapping data from adjacent PEs 12, so they must include overlapping data in advance. That is, tiles generated from input data are assigned to PEs 12 so that neuron data does not overlap in the second and subsequent layer operations, but they include neuron data that overlaps with adjacent PEs 12 in the starting layer.
[0035] The ALU 20 of each PE 12 performs layer-by-layer operations on tiles consisting of multiple input neuron data 30, and stores the output neuron data 32, which are the results of the operations, in the internal RAM 22. In Figure 2, the area indicated by "0,0" to "4,5" indicates the position of each input neuron data 30 that constitutes the tile.
[0036] The input neuron data 30 is temporarily stored in the internal RAM 22 and then output to the ALU 20, where a convolution operation is performed for each layer. Then, as a result of the convolution operation on the input neuron data 30, output neuron data 32 is output from the ALU 20 and stored in the internal RAM 22. The output neuron data 32 shown in white in Figure 2 is the result of the convolution operation on the input neuron data 30.
[0037] Then, each time a convolution operation according to a layer is completed, a PE 12 transmits the output neuron data 32, which is the overlap data, to other adjacent PEs 12. As described above, the overlap data is the peripheral output neuron data 32 among the output neuron data 32 after the operation. In the example of FIG. 2, the overlap data is "1,1", "1,2", "1,3", "1,4", "2,1", "2,4", "3,1", "3,2", "3,3", and "3,4" among the output neuron data 32.
[0038] Then, the overlapped data is sent to other adjacent PEs 12 based on the registered contents of the queue 28. In the example of FIG. 2, the output neuron data 32 of "3,4" is sent to another adjacent PE 12 on the lower right side (SE: South East). The output neuron data 32 of "3,1" is sent to another adjacent PE 12 on the lower left side (SW: South West). The output neuron data 32 of "1,4", "2,4", and "3,4" are sent to another adjacent PE 12 on the right side (E). The output neuron data 32 of "3,1", "3,2", "3,3", and "3,4" are sent to another adjacent PE 12 on the lower side (S). The output neuron data 32 of "1,1", "2,1", and "3,1" are sent to another adjacent PE 12 on the left side (W). The output neuron data 32 of "1,1", "1,2", "1,3", and "1,4" are sent to another adjacent PE 12 on the upper side (N: North). The output neuron data 32 of "1,1" is sent to another PE 12 adjacent to the upper left (NW). The output neuron data 32 of "1,4" is sent to another PE 12 adjacent to the upper right (NE).
[0039] 3 is a schematic diagram showing transmission and reception of overlapping data by a PE 12. Fig. 3(A) shows tiles in the starting layer where convolution operations are performed by each PE 12, and the hatched areas represent overlapping data between adjacent PEs 12. The starting layer corresponds to Activation 0 in Fig. 9.
[0040] FIG. 3(B) shows a case where a PE 12 receives duplicate data from other adjacent PEs 12 before the second or subsequent layer calculation is performed, and as an example, the duplicate data received by the PE 12 located at "1,1" is indicated by an arrow. Note that FIG. 3(B) corresponds to Activation 1 in FIG. 9. In this way, the PE 12 at "1,1" receives duplicate data from other adjacent PEs 12 above, below, left, right, and below right, as well as from the lower left, upper right, and lower right.
[0041] When a PE 12 receives duplicate data from another adjacent PE 12, it performs a convolution operation in the next layer based on the result of the convolution operation in the previous layer and the duplicate data received from the other adjacent PE 12. Specifically, the ALU 20 included in the PE 12 performs mapping to combine the duplicate data received from the other adjacent PE 12 around the result of the operation in the previous layer, thereby forming one tile, and performs a convolution operation in the next layer on this tile.
[0042] For example, among the output neuron data 32 in Figure 2, the hatched lines "0,0" to "0,5", "1,0", "1,5", "2,0", "2,5", "3,0", "3,5", and "4,0" to "4,5" are overlapping data received from other adjacent PEs 12, and as shown in Figure 2, the received overlapping data is combined with the output neuron data 32 by the PE 12 to become the input neuron data 30 that will be the target of the convolution operation by the next layer.
[0043] The timing for transmitting the duplicated data from a PE 12 to another adjacent PE 12 is each time the convolution calculation for each layer by the PE 12 is completed, and when the destination PE 12 is ready to receive the duplicated data. Furthermore, the calculation result when the calculation of the final layer is completed by the Fuse execution in each PE 12 is stored in the external memory 14.
[0044] As described above, the arithmetic device 10 of this embodiment performs CNN using Fuse execution. Each time a convolution operation for each layer is completed, the PE 12 included in the arithmetic device 10 transmits to the adjacent PE 12 the duplicated data required for the operation of the next layer. The PE 12 also performs the convolution operation of the next layer based on the duplicated data received from the adjacent PE 12 and the operation result of the previous layer. Each PE 12 repeatedly transmits and receives this duplicated data as long as the layers for Fuse execution continue.
[0045] In this way, the arithmetic device 10 of this embodiment obtains duplicated data required in each layer from other adjacent PEs 12, thereby reducing duplicated operations between PEs 12 in convolution operations performed by Fuse execution. As a result, the arithmetic device 10 of this embodiment can reduce the amount of calculation in the convolution operations, thereby shortening the execution time of the operations and improving the power performance ratio.
[0046] (Second embodiment) Next, a second embodiment of the present disclosure will be described. In this embodiment, a case where the number of tiles generated from input data is greater than the number of PEs 12 included in the calculation device 10 will be described.
[0047] The arithmetic device 10 of this embodiment executes a loop process in which multiple tiles are assigned to each PE 12 and calculations are performed on all tiles by performing multiple loops. Note that the arithmetic device 10 of this embodiment also executes Fuse and transmits and receives duplicate data between adjacent PEs 12.
[0048] The loop processing of this embodiment will be described with reference to Figures 4 and 5. Figure 4 is a schematic diagram showing the allocation of tiles to the PE 12. Figure 5 is a schematic diagram showing the exchange of duplicate data from the start layer to the final layer.
[0049] In FIG. 4, the arithmetic devices 10 shown in loops 1 to 4 are the same, and perform calculations in the order of loop 1, loop 2, loop 3, and loop 4. As an example, the arithmetic device 10 of this embodiment is composed of 16 PEs 12 arranged two-dimensionally in 4 rows and 4 columns. In the example of FIG. 4, input data, which is image data, is divided into 30 tiles arranged in 6 rows and 5 columns. The numbers written for each PE 12 in FIG. 4 correspond to each divided tile, and each PE 12 is assigned the tile with this number to perform calculations. Note that the two-dimensional arrangement of tiles corresponds to the positions of the input data, which is image data.
[0050] As described above, in the arithmetic device 10 of this embodiment, when the number of tiles is greater than the number of PEs 12, the number of loops is set according to the number of tiles. Then, tiles are assigned to each PE 12 so that the adjacency relationships between the multiple PEs 12 and the multiple tiles match, and calculations are performed on different tiles for each loop. After the multiple PEs 12 have completed calculations on all layers for the assigned tiles, they perform calculations on all layers for the tiles assigned to them in the next loop. As a result, the arithmetic device 10 of this embodiment can perform convolution calculations on all tiles even when the number of tiles is greater than the number of PEs 12.
[0051] In addition, the multiple PEs 12 in this embodiment are divided into essential tile groups and auxiliary tile groups. In the following description, tiles included in the essential tile group are referred to as essential tiles, and tiles included in the auxiliary tile group are referred to as auxiliary tiles.
[0052] An auxiliary tile group is made up of PEs 12 located at the edge of a two-dimensional array of multiple PEs 12. In the example of Figure 4, the PEs 12 in the rightmost column and bottommost row are considered to be part of the auxiliary tile group. Tiles included in the auxiliary tile group are used only to calculate overlapping data required for calculations of adjacent tiles included in the essential tile group, and will be included in the essential tile group in the next loop.
[0053] That is, among the PEs 12 arranged in a two-dimensional array, there are no PEs 12 located at the edges that transmit or receive duplicated data. Therefore, in each loop, there are PEs 12 that cannot transmit or receive the duplicated data that they actually need, resulting in a decrease in the accuracy of the convolution calculation. Therefore, in this embodiment, among the PEs 12 arranged in a two-dimensional array, PEs 12 located at the edges and included in the associated tile group are used only to calculate the duplicated data of other adjacent PEs 12. As a result, in each loop, there are no PEs 12 included in the essential tile group that cannot transmit or receive duplicated data, thereby improving the accuracy of the convolution calculation. Note that tiles used only to calculate duplicated data in the previous loop are included in the essential tile group in the next or subsequent loops and are newly calculated.
[0054] Depending on the allocation of tiles to the PEs 12, there may be PEs 12 that are not assigned tiles and do not perform calculations. Such PEs 12 are unused.
[0055] On the other hand, if a tile located at the end of a required tile group and to which duplicate data is to be sent is the target of calculation in the next loop, the duplicate data cannot be sent directly.
[0056] Therefore, when other tiles adjacent to the tile currently being calculated are calculated in the next or subsequent loop, the overlapping data calculated for each layer from the tile currently being calculated is stored in the external memory 14. Then, the other tiles to be calculated in the next or subsequent loop are calculated using the overlapping data corresponding to each layer stored in the external memory 14. By storing the overlapping data in the external memory 14 in this way, the overlapping data calculated in the previous loop can be used in the next or subsequent loop, eliminating the need to calculate overlapping data between loops.
[0057] Here, with reference to FIGS. 4 and 5, the exchange of duplicated data between tiles in this embodiment, that is, the transmission and reception of duplicated data between PEs 12, will be described.
[0058] 4, arrows between adjacent tiles in a loop indicate the exchange of duplicated data between tiles in the same loop, while arrows between different loops indicate the transmission of duplicated data via the external memory 14.
[0059] 5 shows the transmission and reception of duplicate data in the topmost PE 12 among the multiple PEs 12 arranged in a two-dimensional array, according to the layer direction. That is, in FIG. 5, the lower side shows the operation in the start layer, and the upper side shows the operation in the last layer.
[0060] 4 and 5, for example, in loop 1, tile 3 included in the essential tile group exchanges overlapping data with adjacent tile 2, and also exchanges overlapping data with tile 4 included in the associated tile group, while performing a convolution operation by executing FUSE. Furthermore, tile 3 stores the overlapping data exchanged with tile 4 included in the associated tile group in external memory 14 each time the operation for one layer is completed. Then, in loop 2, tile 4 included in the essential tile group receives overlapping data corresponding to each layer from external memory 14, and also exchanges overlapping data with tile 5, while performing a convolution operation by executing FUSE. The final operation results for each tile obtained by executing FUSE for each tile are also stored in external memory 14.
[0061] 6 is a functional block diagram of the information processing device 40 that performs the process of allocating tiles to the PEs 12. When the information processing device 40 determines the allocation of tiles, it inputs the tiles to the calculation device 10, allocates the tiles to each PE 12, and executes CNN by Fuse execution.
[0062] The information processing device 40 includes a tile generating unit 42, a loop setting unit 44, and an allocation unit 46.
[0063] The tile generation unit 42 divides input data such as image data into a plurality of tiles.
[0064] The loop setting unit 44 sets the number of loops according to the number of tiles and the number of PEs 12. The method for setting the number of loops is not limited. In the example of Fig. 4, tiles are assigned to the PEs 12 in four loops according to the positions of the tiles in the input data.
[0065] However, in the example of FIG. 4, the number of unused PEs 12 is half between loop 2 and loop 4. Therefore, as shown in the example of FIG. 7, tiles 16, 21, and 26 included in loop 3 of FIG. 4 may be assigned as an essential tile group to the left column of unused PEs 12 in loop 2, and tiles 17, 22, and 27 may be assigned as an auxiliary tile group to the right column. Then, tiles 17 to 20, 22 to 25, and 27 to 30 are assigned to loop 3 as essential tiles. This results in a loop count of 3. Note that tiles 17, 22, and 27 assigned to loop 2 do not exchange overlapping data with adjacent tiles 5, 10, and 15. Furthermore, overlapping data required by tiles 17 to 20, 22, and 27 calculated in loop 3 is stored in external memory 14.
[0066] The allocation unit 46 determines the allocation of tiles to the PE 12 according to the number of loops determined by the loop setting unit 44. That is, the allocation unit 46 allocates tiles to be calculated in each loop to the PE 12. The allocation unit 46 also determines tiles that are deemed to be essential tiles and tiles that are deemed to be accessory tiles.
[0067] In this embodiment, tiles are divided into essential tile groups and auxiliary tile groups, but auxiliary tile groups do not have to be set. If auxiliary tile groups are not set, some of the necessary overlapping data will not be obtained, but the number of loops will be reduced, thereby shortening the time required for CNN.
[0068] Also in the first embodiment described above, the tile generation unit 42 included in the information processing device 40 generates tiles based on input data, and the allocation unit 46 allocates the tiles to the PEs 12.
[0069] (Third embodiment) Next, a third embodiment of the present disclosure will be described.
[0070] In the second embodiment, the external memory 14 is used for passing overlapping data between loops, but in this embodiment, the external memory 14 is not used for passing overlapping data between loops.
[0071] Therefore, in this embodiment, a PE 12 that has computed a tile that is included in the auxiliary tile group and is also included in the essential tile group in the next loop virtually moves to the other end of the next loop while retaining the tile. Following this movement, the other PEs 12 also virtually flip their positions and compute new tiles. In the following description, this virtual movement and flipping of a PE 12 is referred to as a "flip."
[0072] The flip of this embodiment will be described with reference to Fig. 8. The overview of Fig. 8 is the same as Fig. 4, and the numbers attached to each PE 12 indicate the tiles assigned to that PE 12. Furthermore, the numbers (n, m) for each PE 12 indicate the actual placement position of the PE 12.
[0073] First, in loop 1 of this embodiment, the adjacency relationship between each tile matches the adjacency relationship between each PE 12. The PEs 12 that computed the tiles included in the auxiliary tile group in loop 1 and included in the essential tile group in the next loop 2 are the PEs 12 (0,3) to (3,3) located at the right end of the fourth column. Therefore, the PEs 12 (0,3) to (3,3) virtually move to the other end in loop 2 while retaining the computation results in loop 1, including the overlapping data of each layer of tiles 4, 9, 14, and 19. In other words, the PEs 12 (0,3) to (3,3) were located at the right end in loop 1, but are virtually located at the left end, the first column, in loop 2.
[0074] As the PEs 12 (0,3) to (3,3) move, the other PEs 12 in loop 2 are virtually reversed from their positions in loop 1. That is, the PEs 12 (0,2) to (3,2) that were located in the third column in loop 1 are virtually located in the second column in loop 2. New tiles to be used as the target of calculations are assigned to the PEs 12 (0,2) to (3,2).
[0075] Furthermore, the PEs 12 located in the second column (0,1) to (3,1) in loop 1 are virtually located in the third column in loop 2. Furthermore, the PEs 12 located in the first column (0,0) to (3,0) in loop 1 are virtually located in the fourth column (the rightmost column) in loop 2. In the example of FIG. 8, the PEs 12 in the third and fourth columns in loop 2 are unused.
[0076] Similarly, the PE 12 that computed the tiles included in the auxiliary tile group in loop 1 and included in the essential tile group in the next or subsequent loop, loop 3, is the PE 12 (3,0) to (3,3) located at the bottom of the fourth row. The PE 12 (3,0) to (3,3) were located at the bottom in loop 1, but are virtually located at the top of the first row in loop 3. Note that the PE 12 (3,0) to (3,3) continue to store the computation results, including overlapping data of each layer of tiles 16 to 19 computed in loop 1, in internal memory 22 in order to use them in loop 3 as well.
[0077] As the PEs 12 at (3,0) to (3,3) move, the other PEs 12 in Loop 3 are virtually reversed from their positions in Loop 1. That is, the PEs 12 at (2,0) to (2,3) that were located on the third row in Loop 1 are virtually located on the second row in Loop 3. Also, the PEs 12 at (1,0) to (1,3) that were located on the second row in Loop 1 are virtually located on the third row in Loop 3. New tiles to be used as the target of calculations are assigned to these PEs 12 that are virtually located on the second and third rows in Loop 3.
[0078] In addition, the PE12 at (0,0) to (0,3) located in the first row, which is the top end of the loop 1, is virtually located in the fourth row, which is the bottom end of the loop 3. In the example of FIG. 8, the PE12 in the fourth row is unused in the loop 3.
[0079] Similarly, the PE12 that computed the tiles included in the auxiliary tile group in loop 3 and included in the essential tile group in the next loop 4 is the PE12 (3,3) to (0,3) virtually located at the right end of the fourth column. The PE12 (3,3) to (0,3) virtually located in the first column, the left end, in loop 4. The PE12 (3,3) to (1,3) virtually move to the left end in loop 4 while retaining the computation results in loop 3, including the overlapping data of tiles 19, 24, and 29 in each layer.
[0080] As PE12 (3,3) to (0,3) moves, other PE12 in loop 4 are virtually inverted from their positions in loop 3. That is, PE12 (3,2) to (0,2) that was located in the third column in loop 3 is virtually located in the second column in loop 4. New tiles to be used for calculation are assigned to these PE12 (3,2) to (0,2).
[0081] Furthermore, the PEs 12 from (3,1) to (0,1) that were located in the second column in loop 3 are virtually located in the third column in loop 4. Furthermore, the PEs 12 from (3,0) to (0,0) that were located in the first column, which is the left end, in loop 3 are virtually located in the fourth column, which is the right end, in loop 4. In the example of FIG. 8, the PEs 12 in the third and fourth columns in loop 4 are unused.
[0082] In this way, the calculation device 10 of this embodiment flips the setting of the tile position and the number of the PE 12 at each new loop. This virtually changes the position of the PE 12 so that the calculation results of tiles that are to be calculated in the next or subsequent loops among tiles calculated in the previous loop can be used, eliminating the need to store duplicate data in the external memory 14.
[0083] Although the present disclosure has been described using the above-mentioned embodiments, the technical scope of the present disclosure is not limited to the scope described in the above-mentioned embodiments. Various modifications or improvements can be made to the above-mentioned embodiments without departing from the gist of the disclosure, and such modifications or improvements are also included in the technical scope of the present disclosure.
Claims
1. A computing device (10) is configured with a plurality of computing units (12) each performing an operation for each of divided data obtained by dividing input data into a plurality of pieces, and the computing units successively perform convolution operations for each of a plurality of layers on the divided data, The computing device a calculation unit (20) that performs a convolution calculation for each layer on the divided data; a transmitting unit (24) for transmitting data to other adjacent computing machines; a receiving unit (26) for receiving data from another adjacent computing device; Equipped with transmitting predetermined data required for the next calculation of the layer to another adjacent one of the computing devices each time the convolution calculation for each layer is completed, and performing the next convolution calculation of the layer based on the predetermined data received from the adjacent computing device and the previous calculation result of the layer; the divided data input to the computing units includes overlapping data between adjacent computing units so as to correspond only to the convolution operation by the first layer; Computing device.
2. the input data is multidimensional array data, If the number of the divided data sets is greater than the number of the computing units, the number of loops is set according to the number of the divided data sets; the divided data are assigned to each of the computing units so that an adjacency relationship between the plurality of computing units and an adjacency relationship between the plurality of divided data items coincide with each other and an operation is performed on different divided data items for each of the loops; the plurality of computing devices perform the calculations on all the layers on the divided data allocated to them in the next loop after the calculations on all the layers on the divided data allocated to them have been completed; The computing device of claim 1 .
3. The plurality of computing devices are divided into a first group and a second group, the second group is composed of the computing units located at the end of the plurality of computing units arranged two-dimensionally, the divided data included in the second group is used only for calculating the predetermined data required for calculation of the adjacent divided data included in the first group, The computing device according to claim 2 .
4. When other divided data adjacent to the divided data currently being calculated and included in the first group is calculated by the next or subsequent loop, the predetermined data calculated for each layer from the divided data currently being calculated is stored in an external memory, The arithmetic device according to claim 3 , wherein the other divided data to be calculated in the next and subsequent loops is calculated using the predetermined data stored in the external memory.
5. 4. The arithmetic device according to claim 3, wherein data that is included in the second group and is held by the arithmetic unit that calculated the divided data that is included in the first group in the next loop is moved to the arithmetic unit at the other end in the next loop, and data held by the other arithmetic unit is also moved to the arithmetic unit at an inverted position to calculate new divided data.
6. A computing method using a computing device that is configured by a plurality of computing machines that perform computations on each of divided data obtained by dividing input data into a plurality of pieces, and in which the computing machines continuously perform convolution computations for each of a plurality of layers on the divided data, a first step in which the computing device performs a convolution operation using the layer on the input divided data; a second step in which the computing device transmits predetermined data required for the next computation of the layer to the adjacent computing device each time the computing device completes the convolution computation for each layer; a third step in which the computing unit performs a convolution operation in the next layer based on the predetermined data received from the adjacent computing unit and the previous calculation result in the layer; and the divided data input to the computing units includes overlapping data between adjacent computing units so as to correspond only to the convolution operation by the first layer; Calculation method.
Citation Information
Patent Citations
Versatile parallel processing architecture
JP2018518753A
System, Method, and Accelerator to Process Convolutional Neural Network Layers
US20190220734A1